Back to home page

LXR

 
 

    


Warning, /bsps/sparc/shared/start/linkcmds.base is written in an unsupported language. File is not indexed.

0001 /*  linkcmds
0002  */
0003 
0004 OUTPUT_ARCH(sparc)
0005 __DYNAMIC  =  0;
0006 
0007 /*
0008  * The memory map looks like this:
0009  * +--------------------+ <- low memory
0010  * | .text              |
0011  * |        etext       |
0012  * |        ctor list   | the ctor and dtor lists are for
0013  * |        dtor list   | C++ support
0014  * |        _endtext    |
0015  * +--------------------+
0016  * | .data              | initialized data goes here
0017  * |        _sdata      |
0018  * |        _edata      |
0019  * +--------------------+
0020  * | .bss               |
0021  * |        __bss_start | start of bss, cleared by crt0
0022  * |        _end        | start of heap, used by sbrk()
0023  * +--------------------+
0024  * |    heap space      |
0025  * |        _ENDHEAP    |
0026  * |    stack space     | 
0027  * |        __stack     | top of stack
0028  * +--------------------+ <- high memory
0029  */
0030 
0031 _RAM_END = _RAM_START + _RAM_SIZE;
0032 
0033 _PROM_END = _PROM_START + _PROM_SIZE;
0034 
0035 /*
0036  *  Alternate names without leading _.
0037  */
0038 
0039 PROM_START = _PROM_START;
0040 PROM_SIZE = _PROM_SIZE;
0041 PROM_END = _PROM_END;
0042 
0043 RAM_START = _RAM_START;
0044 RAM_SIZE = _RAM_SIZE;
0045 RAM_END = _RAM_END;
0046 
0047 /*
0048  * SPARC monitor assumes this is present to provide proper RTEMS awareness.
0049  */
0050 EXTERN(rtems_get_version_string);
0051 
0052 STARTUP(start.o)
0053 
0054 /*
0055  * stick everything in ram (of course)
0056  */
0057 SECTIONS
0058 {
0059   .text :
0060   {
0061     CREATE_OBJECT_SYMBOLS
0062     text_start = .;
0063     _text_start = .;
0064     *(.text*)
0065     . = ALIGN (16);
0066 
0067     KEEP(*(.eh_frame*))
0068     . = ALIGN (16);
0069 
0070     *(.gnu.linkonce.t*)
0071 
0072     /*
0073      * C++ constructors
0074      */
0075     /* gcc uses crtbegin.o to find the start of
0076        the constructors, so we make sure it is
0077        first.  Because this is a wildcard, it
0078        doesn't matter if the user does not
0079        actually link against crtbegin.o; the
0080        linker won't look for a file to match a
0081        wildcard.  The wildcard also means that it
0082        doesn't matter which directory crtbegin.o
0083        is in.  */
0084     KEEP (*crtbegin.o(.ctors))
0085     KEEP (*crtbegin?.o(.ctors))
0086     /* We don't want to include the .ctor section from
0087        the crtend.o file until after the sorted ctors.
0088        The .ctor section from the crtend file contains the
0089        end of ctors marker and it must be last */
0090     KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
0091     KEEP (*(SORT(.ctors.*)))
0092     KEEP (*(.ctors))
0093     KEEP (*crtbegin.o(.dtors))
0094     KEEP (*crtbegin?.o(.dtors))
0095     KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
0096     KEEP (*(SORT(.dtors.*)))
0097     KEEP (*(.dtors))
0098 
0099     _rodata_start = . ;
0100     *(.rodata*)
0101     *(.gnu.linkonce.r*)
0102     _erodata = ALIGN( 0x10 ) ;
0103 
0104     etext = ALIGN(0x10);
0105     _etext = .;
0106     KEEP(*(.init*))
0107     KEEP(*(.fini*))
0108     *(.lit)
0109     *(.shdata)
0110     . = ALIGN (16);
0111   } > ram
0112   .tdata : {
0113     _TLS_Data_begin = .;
0114     *(.tdata .tdata.* .gnu.linkonce.td.*)
0115     _TLS_Data_end = .;
0116   } > ram
0117   .tbss : {
0118     _TLS_BSS_begin = .;
0119     *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
0120     _TLS_BSS_end = .;
0121   } > ram
0122   _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
0123   _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
0124   _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
0125   _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
0126   _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
0127   _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
0128   .rtemsroset : {
0129     /* for pre rtems-libbsd FreeBSD code */
0130     __start_set_sysctl_set = .;
0131     KEEP(*(set_sysctl_*));
0132     __stop_set_sysctl_set = .;
0133     KEEP(*(set_domain_*));
0134     KEEP(*(set_pseudo_*));
0135 
0136     KEEP (*(SORT(.rtemsroset.*)))
0137 
0138     . = ALIGN (16);
0139     _endtext = .;
0140   } >ram
0141   .rela.dyn       :
0142     {
0143       *(.rela.init)
0144       *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
0145       *(.rela.fini)
0146       *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
0147       *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
0148       *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
0149       *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
0150       *(.rela.ctors)
0151       *(.rela.dtors)
0152       *(.rela.got)
0153       *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
0154       *(.rela.rtemsroset*)
0155       *(.rela.rtemsrwset*)
0156     } >ram
0157   .noinit (NOLOAD) : {
0158       *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
0159   } > ram
0160   .rtemsstack (NOLOAD) : {
0161     *(SORT(.rtemsstack.*))
0162   } > ram
0163   .data :
0164   {
0165     data_start = .;
0166     _data_start = .;
0167     _sdata = . ;
0168     *(.data*)
0169     *(.gnu.linkonce.d*)
0170     . = ALIGN(0x10);
0171     *(.gcc_except_table*)
0172     . = ALIGN(0x10);
0173     edata = .;
0174     _edata = .;
0175   } > ram
0176   _data_load_start = LOADADDR (.data);
0177   .rtemsrwset : {
0178     KEEP (*(SORT(.rtemsrwset.*)))
0179   } >ram
0180   .dynamic        : { *(.dynamic)       } >ram
0181   .jcr            : { *(.jcr)           } >ram
0182   .got            : { *(.got)           } >ram
0183   .plt            : { *(.plt)           } >ram
0184   .hash           : { *(.hash)          } >ram
0185   .dynrel         : { *(.dynrel)        } >ram
0186   .dynsym         : { *(.dynsym)        } >ram
0187   .dynstr         : { *(.dynstr)        } >ram
0188   .hash           : { *(.hash)          } >ram
0189   .shbss :
0190   {
0191     *(.shbss)
0192   } > ram
0193   .bss :
0194   {
0195     __bss_start = ALIGN(0x8);
0196     _bss_start = .;
0197     bss_start = .;
0198     *(.bss .bss* .gnu.linkonce.b*)
0199     *(COMMON)
0200     . = ALIGN (16);
0201     end = .;
0202     _end = ALIGN(0x8);
0203     __end = ALIGN(0x8);
0204   } > ram
0205   .stab . (NOLOAD) :
0206   {
0207     [ .stab ]
0208   }
0209   .stabstr . (NOLOAD) :
0210   {
0211     [ .stabstr ]
0212   }
0213 
0214   /* Addition to let linker know about custom section for GDB pretty-printing support. */
0215   .debug_gdb_scripts 0 : { *(.debug_gdb_scripts) }
0216 }