OpenCores
URL https://opencores.org/ocsvn/neorv32/neorv32/trunk

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [sw/] [common/] [neorv32.ld] - Diff between revs 61 and 62

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 61 Rev 62
Line 53... Line 53...
/* "rom"   : instruction memory (int/ext IMEM or bootloader ROM)              */
/* "rom"   : instruction memory (int/ext IMEM or bootloader ROM)              */
/* "iodev" : peripheral/IO devices                                            */
/* "iodev" : peripheral/IO devices                                            */
/* ************************************************************************** */
/* ************************************************************************** */
MEMORY
MEMORY
{
{
/* section base addresses and sizes have to be a multiple of 4-bytes */
/* section base addresses and sizes have to be a multiple of 4 bytes */
/* ram section: first value of LENGTH => data memory used by bootloader (fixed!); second value of LENGTH => *physical* size of data memory */
/* ram section: first value of LENGTH => data memory used by bootloader (fixed!); second value of LENGTH => *physical* size of data memory */
/* adapt the right-most value to match the *total physical data memory size* of your setup */
/* adapt the right-most value to match the *total physical data memory size* of your setup */
 
 
  ram  (rwx) : ORIGIN = 0x80000000, LENGTH = DEFINED(make_bootloader) ? 512 : 8*1024
  ram  (rwx) : ORIGIN = 0x80000000, LENGTH = DEFINED(make_bootloader) ? 512 : 8*1024
 
 
Line 73... Line 73...
SECTIONS
SECTIONS
{
{
  /* start section on WORD boundary */
  /* start section on WORD boundary */
  . = ALIGN(4);
  . = ALIGN(4);
 
 
  .interp         : { *(.interp) }
 
  .note.gnu.build-id  : { *(.note.gnu.build-id) }
 
  .hash           : { *(.hash) }
 
  .gnu.hash       : { *(.gnu.hash) }
 
  .dynsym         : { *(.dynsym) }
 
  .dynstr         : { *(.dynstr) }
 
  .gnu.version    : { *(.gnu.version) }
 
  .gnu.version_d  : { *(.gnu.version_d) }
 
  .gnu.version_r  : { *(.gnu.version_r) }
 
  .rela.init      : { *(.rela.init) }
 
  .rela.text      : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
 
  .rela.fini      : { *(.rela.fini) }
 
  .rela.rodata    : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
 
  .rela.data.rel.ro   : { *(.rela.data.rel.ro .rela.data.rel.ro.* .rela.gnu.linkonce.d.rel.ro.*) }
 
  .rela.data      : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
 
  .rela.tdata     : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
 
  .rela.tbss      : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
 
  .rela.ctors     : { *(.rela.ctors) }
 
  .rela.dtors     : { *(.rela.dtors) }
 
  .rela.got       : { *(.rela.got) }
 
  .rela.sdata     : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
 
  .rela.sbss      : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) }
 
  .rela.sdata2    : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
 
  .rela.sbss2     : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
 
  .rela.bss       : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
 
  /* Actual instructions */
  /* Actual instructions */
  .text :
  .text :
  {
  {
    PROVIDE(__text_start = .);
    PROVIDE(__text_start = .);
    PROVIDE(__textstart = .);
    PROVIDE(__textstart = .);
Line 159... Line 135...
    PROVIDE (_etext = .);
    PROVIDE (_etext = .);
    PROVIDE (etext = .);
    PROVIDE (etext = .);
  } > rom
  } > rom
 
 
 
 
  /* read-only data, appended to text */
  /* read-only data, appended to .text */
  .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
 
  .rodata1        : { *(.rodata1) }
 
  .rodata :
  .rodata :
  {
  {
    PROVIDE_HIDDEN (__init_array_start = .);
    PROVIDE_HIDDEN (__init_array_start = .);
    KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
    KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
    KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
    KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
Line 174... Line 148...
    PROVIDE_HIDDEN (__fini_array_start = .);
    PROVIDE_HIDDEN (__fini_array_start = .);
    KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
    KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
    KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
    KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
    PROVIDE_HIDDEN (__fini_array_end = .);
    PROVIDE_HIDDEN (__fini_array_end = .);
 
 
 
    *(.rodata .rodata.* .gnu.linkonce.r.*)
 
    *(.rodata1)
 
 
    /* finish section on WORD boundary */
    /* finish section on WORD boundary */
    . = ALIGN(4);
    . = ALIGN(4);
  } > rom
  } > rom
 
 
 
 
  /* initialized read/write data, accessed in RAM, placed in ROM, copied during boot */
  /* initialized read/write data, accessed in RAM, placed in ROM, copied during boot */
  .jcr            : { KEEP (*(.jcr)) }
 
  .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }
 
  .dynamic        : { *(.dynamic) }
 
  .data1          : { *(.data1) }
 
  .got            : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) }
 
  .data :
  .data :
  {
  {
    __DATA_BEGIN__ = .;
    __DATA_BEGIN__ = .;
    __SDATA_BEGIN__ = .;
    __SDATA_BEGIN__ = .;
    *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
    *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
 
    *(.data1)
    *(.data .data.* .gnu.linkonce.d.*)
    *(.data .data.* .gnu.linkonce.d.*)
    SORT(CONSTRUCTORS)
    SORT(CONSTRUCTORS)
 
 
 
    *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*)
 
    *(.dynamic)
 
 
    /* We want the small data sections together, so single-instruction offsets
    /* We want the small data sections together, so single-instruction offsets
       can access them all, and initialized data all before uninitialized, so
       can access them all, and initialized data all before uninitialized, so
       we can shorten the on-disk segment size.  */
       we can shorten the on-disk segment size.  */
 
 
    *(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*)
    *(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*)
Line 215... Line 190...
 
 
  } > ram AT > rom
  } > ram AT > rom
 
 
 
 
  /* zero/non-initialized read/write data placed in RAM */
  /* zero/non-initialized read/write data placed in RAM */
  .sbss2          : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
 
  .tbss           : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
 
  .bss (NOLOAD):
  .bss (NOLOAD):
  {
  {
    __bss_start = .;
    __bss_start = .;
    *(.dynsbss)
    *(.dynsbss)
    *(.sbss .sbss.* .gnu.linkonce.sb.*)
    *(.sbss .sbss.* .gnu.linkonce.sb.*)
 
    *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
 
    *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
    *(.scommon)
    *(.scommon)
 
 
    *(.dynbss)
    *(.dynbss)
    *(.bss .bss.* .gnu.linkonce.b.*)
    *(.bss .bss.* .gnu.linkonce.b.*)
 
 
    PROVIDE_HIDDEN (__preinit_array_start = .);
    PROVIDE_HIDDEN (__preinit_array_start = .);
    KEEP (*(.preinit_array))
    KEEP (*(.preinit_array))
Line 241... Line 215...
       pad the .data section.  */
       pad the .data section.  */
    . = ALIGN(. != 0 ? 32 / 8 : 1);
    . = ALIGN(. != 0 ? 32 / 8 : 1);
 
 
    . = ALIGN(32 / 8);
    . = ALIGN(32 / 8);
    __BSS_END__ = .;
    __BSS_END__ = .;
    __global_pointer$ = MIN(__SDATA_BEGIN__ + 0x800,
    __global_pointer$ = MIN(__SDATA_BEGIN__ + 0x800, MAX(__DATA_BEGIN__ + 0x800, __BSS_END__ - 0x800));
                            MAX(__DATA_BEGIN__ + 0x800, __BSS_END__ - 0x800));
 
    _end = .; PROVIDE (end = .);
    _end = .; PROVIDE (end = .);
  } > ram
  } > ram
 
 
 
 
 
  /* Yet unused */
 
  .jcr                : { KEEP (*(.jcr)) }
 
  .got                : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) }  .interp         : { *(.interp) }
 
  .note.gnu.build-id  : { *(.note.gnu.build-id) }
 
  .hash               : { *(.hash) }
 
  .gnu.hash           : { *(.gnu.hash) }
 
  .dynsym             : { *(.dynsym) }
 
  .dynstr             : { *(.dynstr) }
 
  .gnu.version        : { *(.gnu.version) }
 
  .gnu.version_d      : { *(.gnu.version_d) }
 
  .gnu.version_r      : { *(.gnu.version_r) }
 
  .rela.init          : { *(.rela.init) }
 
  .rela.text          : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
 
  .rela.fini          : { *(.rela.fini) }
 
  .rela.rodata        : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
 
  .rela.data.rel.ro   : { *(.rela.data.rel.ro .rela.data.rel.ro.* .rela.gnu.linkonce.d.rel.ro.*) }
 
  .rela.data          : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
 
  .rela.tdata         : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
 
  .rela.tbss          : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
 
  .rela.ctors         : { *(.rela.ctors) }
 
  .rela.dtors         : { *(.rela.dtors) }
 
  .rela.got           : { *(.rela.got) }
 
  .rela.sdata         : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
 
  .rela.sbss          : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) }
 
  .rela.sdata2        : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
 
  .rela.sbss2         : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
 
  .rela.bss           : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
 
 
 
 
  /* Stabs debugging sections.  */
  /* Stabs debugging sections.  */
  .stab          0 : { *(.stab) }
  .stab          0 : { *(.stab) }
  .stabstr       0 : { *(.stabstr) }
  .stabstr       0 : { *(.stabstr) }
  .stab.excl     0 : { *(.stab.excl) }
  .stab.excl     0 : { *(.stab.excl) }
  .stab.exclstr  0 : { *(.stab.exclstr) }
  .stab.exclstr  0 : { *(.stab.exclstr) }
Line 292... Line 294...
  .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
  .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
  /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
  /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
 
 
 
 
  /* Provide symbols for neorv32 crt0 start-up code */
  /* Provide symbols for neorv32 crt0 start-up code */
 
  PROVIDE(__ctr0_imem_begin          = ORIGIN(rom));
 
  PROVIDE(__ctr0_dmem_begin          = ORIGIN(ram));
  PROVIDE(__crt0_stack_begin = (ORIGIN(ram) + LENGTH(ram)) - 4);
  PROVIDE(__crt0_stack_begin = (ORIGIN(ram) + LENGTH(ram)) - 4);
  PROVIDE(__crt0_bss_start   = __bss_start);
  PROVIDE(__crt0_bss_start   = __bss_start);
  PROVIDE(__crt0_bss_end     = __BSS_END__);
  PROVIDE(__crt0_bss_end     = __BSS_END__);
  PROVIDE(__crt0_copy_data_src_begin = __etext + SIZEOF(.rodata));
  PROVIDE(__crt0_copy_data_src_begin = __etext + SIZEOF(.rodata));
  PROVIDE(__crt0_copy_data_dst_begin = __DATA_BEGIN__);
  PROVIDE(__crt0_copy_data_dst_begin = __DATA_BEGIN__);

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.