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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [libgloss/] [sparc/] [ex931.ld] - Diff between revs 57 and 1765

Only display areas with differences | Details | Blame | View Log

Rev 57 Rev 1765
/*
/*
 *uncomment this if you want the linker to output srecords.
 *uncomment this if you want the linker to output srecords.
OUTPUT_FORMAT(srec)
OUTPUT_FORMAT(srec)
 *
 *
 */
 */
ENTRY(_start)
ENTRY(_start)
STARTUP(crt0.o)
STARTUP(crt0.o)
OUTPUT_ARCH(sparc)
OUTPUT_ARCH(sparc)
SEARCH_DIR(.)
SEARCH_DIR(.)
__DYNAMIC  =  0;
__DYNAMIC  =  0;
GROUP (-lc -lslite931 -lgcc)
GROUP (-lc -lslite931 -lgcc)
/*
/*
 * The memory map looks like this:
 * The memory map looks like this:
 * +--------------------+ <- low memory
 * +--------------------+ <- low memory
 * | .text              |
 * | .text              |
 * |        _stext       |
 * |        _stext       |
 * |        _etext      |
 * |        _etext      |
 * |        ctor list   | the ctor and dtor lists are for
 * |        ctor list   | the ctor and dtor lists are for
 * |        dtor list   | C++ support
 * |        dtor list   | C++ support
 * |        _end_text   |
 * |        _end_text   |
 * +--------------------+
 * +--------------------+
 * | .data              | initialized data goes here
 * | .data              | initialized data goes here
 * |        _sdata      |
 * |        _sdata      |
 * |        _edata      |
 * |        _edata      |
 * +--------------------+
 * +--------------------+
 * | .bss               |
 * | .bss               |
 * |        __bss_start | start of bss, cleared by crt0
 * |        __bss_start | start of bss, cleared by crt0
 * |        _end        | start of heap, used by sbrk()
 * |        _end        | start of heap, used by sbrk()
 * +--------------------+
 * +--------------------+
 * |    heap space      |
 * |    heap space      |
 * |        _ENDHEAP    |
 * |        _ENDHEAP    |
 * |    stack space     |
 * |    stack space     |
 * |        __stack     | top of stack
 * |        __stack     | top of stack
 * +--------------------+ <- high memory
 * +--------------------+ <- high memory
 */
 */
_STACK_SIZE = (16 * 1024);
_STACK_SIZE = (16 * 1024);
_RAM_SIZE = 2M;
_RAM_SIZE = 2M;
_RAM_START = 0x40000000;
_RAM_START = 0x40000000;
_RAM_END = _RAM_START + _RAM_SIZE;
_RAM_END = _RAM_START + _RAM_SIZE;
/*
/*
 * Base address of the on-CPU peripherals. This is for compatability
 * Base address of the on-CPU peripherals. This is for compatability
 * with the simulator.
 * with the simulator.
 */
 */
_ERC32_MEC = 0x0;
_ERC32_MEC = 0x0;
/*
/*
 * Setup the memory map of the MB86931-EB Board (ex931)
 * Setup the memory map of the MB86931-EB Board (ex931)
 * stack grows down towards low memory.
 * stack grows down towards low memory.
 */
 */
MEMORY
MEMORY
{
{
  ram (rwx) : ORIGIN = 0x40000000, LENGTH = 2M
  ram (rwx) : ORIGIN = 0x40000000, LENGTH = 2M
}
}
__stack = _RAM_START + _RAM_SIZE - 4 * 16;
__stack = _RAM_START + _RAM_SIZE - 4 * 16;
__trap_stack = (_RAM_START + _RAM_SIZE - 4 * 16) - _STACK_SIZE;
__trap_stack = (_RAM_START + _RAM_SIZE - 4 * 16) - _STACK_SIZE;
/*
/*
 * All the symbols that might be accessed from C code need to be
 * All the symbols that might be accessed from C code need to be
 * listed twice, once with an additional underscore. aout format needs
 * listed twice, once with an additional underscore. aout format needs
 * and extra underscore, whereas coff & elf doesn't. This is to work
 * and extra underscore, whereas coff & elf doesn't. This is to work
 * with both.
 * with both.
 */
 */
/*
/*
 * Initalize some symbols to be zero so we can reference them in the
 * Initalize some symbols to be zero so we can reference them in the
 * crt0 without core dumping. These functions are all optional, but
 * crt0 without core dumping. These functions are all optional, but
 * we do this so we can have our crt0 always use them if they exist.
 * we do this so we can have our crt0 always use them if they exist.
 * This is so BSPs work better when using the crt0 installed with gcc.
 * This is so BSPs work better when using the crt0 installed with gcc.
 * We have to initalize them twice, so we cover a.out (which prepends
 * We have to initalize them twice, so we cover a.out (which prepends
 * an underscore) and coff object file formats.
 * an underscore) and coff object file formats.
 */
 */
PROVIDE (hardware_init_hook = 0);
PROVIDE (hardware_init_hook = 0);
PROVIDE (_hardware_init_hook = 0);
PROVIDE (_hardware_init_hook = 0);
PROVIDE (software_init_hook = 0);
PROVIDE (software_init_hook = 0);
PROVIDE (_software_init_hook = 0);
PROVIDE (_software_init_hook = 0);
SECTIONS
SECTIONS
{
{
  .text : {
  .text : {
    stext = .;
    stext = .;
    _stext = .;
    _stext = .;
    CREATE_OBJECT_SYMBOLS
    CREATE_OBJECT_SYMBOLS
    *(.text)
    *(.text)
     __CTOR_LIST__ = .;
     __CTOR_LIST__ = .;
    LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
    LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
    *(.ctors)
    *(.ctors)
    LONG(0)
    LONG(0)
    __CTOR_END__ = .;
    __CTOR_END__ = .;
    __DTOR_LIST__ = .;
    __DTOR_LIST__ = .;
    LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
    LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
    *(.dtors)
    *(.dtors)
     LONG(0)
     LONG(0)
    __DTOR_END__ = .;
    __DTOR_END__ = .;
    _etext  =  .;
    _etext  =  .;
    *(.lit)
    *(.lit)
    *(.shdata)
    *(.shdata)
  }  > ram
  }  > ram
  .shbss SIZEOF(.text) + ADDR(.text) :  {
  .shbss SIZEOF(.text) + ADDR(.text) :  {
    *(.shbss)
    *(.shbss)
  }
  }
  .talias : { }  > ram
  .talias : { }  > ram
  .data  : {
  .data  : {
    sdata  =  .;
    sdata  =  .;
    _sdata  =  .;
    _sdata  =  .;
    *(.data)
    *(.data)
    edata  =  .;
    edata  =  .;
    _edata  =  .;
    _edata  =  .;
  } > ram
  } > ram
  .bss SIZEOF(.data) + ADDR(.data) : {
  .bss SIZEOF(.data) + ADDR(.data) : {
   sbss = . ;
   sbss = . ;
   _sbss = . ;
   _sbss = . ;
   __bss_start = ALIGN(0x8);
   __bss_start = ALIGN(0x8);
   __bss_start = ALIGN(0x8);
   __bss_start = ALIGN(0x8);
   *(.bss)
   *(.bss)
   *(COMMON)
   *(COMMON)
     end = ALIGN(0x8);
     end = ALIGN(0x8);
     _end = ALIGN(0x8);
     _end = ALIGN(0x8);
     __end = ALIGN(0x8);
     __end = ALIGN(0x8);
     ebss = .;
     ebss = .;
     _ebss = .;
     _ebss = .;
  }
  }
  .mstack  : { }  > ram
  .mstack  : { }  > ram
  .rstack  : { }  > ram
  .rstack  : { }  > ram
  .stab  0 (NOLOAD) : {
  .stab  0 (NOLOAD) : {
    [ .stab ]
    [ .stab ]
  }
  }
  .stabstr  0 (NOLOAD) :
  .stabstr  0 (NOLOAD) :
  {
  {
    [ .stabstr ]
    [ .stabstr ]
  }
  }
  /* DWARF debug sections.
  /* DWARF debug sections.
     Symbols in the DWARF debugging sections are relative to the beginning
     Symbols in the DWARF debugging sections are relative to the beginning
     of the section so we begin them at 0.  */
     of the section so we begin them at 0.  */
  /* DWARF 1 */
  /* DWARF 1 */
  .debug          0 : { *(.debug) }
  .debug          0 : { *(.debug) }
  .line           0 : { *(.line) }
  .line           0 : { *(.line) }
  /* GNU DWARF 1 extensions */
  /* GNU DWARF 1 extensions */
  .debug_srcinfo  0 : { *(.debug_srcinfo) }
  .debug_srcinfo  0 : { *(.debug_srcinfo) }
  .debug_sfnames  0 : { *(.debug_sfnames) }
  .debug_sfnames  0 : { *(.debug_sfnames) }
  /* DWARF 1.1 and DWARF 2 */
  /* DWARF 1.1 and DWARF 2 */
  .debug_aranges  0 : { *(.debug_aranges) }
  .debug_aranges  0 : { *(.debug_aranges) }
  .debug_pubnames 0 : { *(.debug_pubnames) }
  .debug_pubnames 0 : { *(.debug_pubnames) }
  /* DWARF 2 */
  /* DWARF 2 */
  .debug_info     0 : { *(.debug_info) }
  .debug_info     0 : { *(.debug_info) }
  .debug_abbrev   0 : { *(.debug_abbrev) }
  .debug_abbrev   0 : { *(.debug_abbrev) }
  .debug_line     0 : { *(.debug_line) }
  .debug_line     0 : { *(.debug_line) }
  .debug_frame    0 : { *(.debug_frame) }
  .debug_frame    0 : { *(.debug_frame) }
  .debug_str      0 : { *(.debug_str) }
  .debug_str      0 : { *(.debug_str) }
  .debug_loc      0 : { *(.debug_loc) }
  .debug_loc      0 : { *(.debug_loc) }
  .debug_macinfo  0 : { *(.debug_macinfo) }
  .debug_macinfo  0 : { *(.debug_macinfo) }
  /* SGI/MIPS DWARF 2 extensions */
  /* SGI/MIPS DWARF 2 extensions */
  .debug_weaknames 0 : { *(.debug_weaknames) }
  .debug_weaknames 0 : { *(.debug_weaknames) }
  .debug_funcnames 0 : { *(.debug_funcnames) }
  .debug_funcnames 0 : { *(.debug_funcnames) }
  .debug_typenames 0 : { *(.debug_typenames) }
  .debug_typenames 0 : { *(.debug_typenames) }
  .debug_varnames  0 : { *(.debug_varnames) }
  .debug_varnames  0 : { *(.debug_varnames) }
  /* These must appear regardless of  .  */
  /* These must appear regardless of  .  */
}
}
 
 

powered by: WebSVN 2.1.0

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