Back to home page

LXR

 
 

    


Warning, /bsps/powerpc/mpc8260ads/start/linkcmds is written in an unsupported language. File is not indexed.

0001 /*
0002  *  This file contains directives for the GNU linker which are specific
0003  *  to the MPC8260ADS Board
0004  */
0005 
0006 OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
0007               "elf32-powerpc")
0008 OUTPUT_ARCH(powerpc)
0009 
0010 ENTRY(start)
0011 STARTUP(start.o)
0012 EXTERN(__vectors)
0013 
0014 /*
0015  * Declare some sizes.
0016  * XXX: The assignment of ". += XyzSize;" fails in older gld's if the
0017  *      number used there is not constant.  If this happens to you, edit
0018  *      the lines marked XXX below to use a constant value.
0019  */
0020 RamBase     = DEFINED(RamBase) ? RamBase : 0x0;
0021 RamSize     = DEFINED(RamSize) ? RamDiskSize : 0x0800000; /* 8M program ram */
0022 RamEnd      = RamBase + RamSize;
0023 HeapSize    = DEFINED(HeapSize) ? HeapSize : 0x0;
0024 RamDiskBase = DEFINED(RamDiskBase) ? RamDiskBase : 0x0800000;
0025 RamDiskSize = DEFINED(RamDiskSize) ? RamDiskSize : 0x0800000; /* 8M ram disk */
0026 
0027 MEMORY
0028 {
0029   ram : org = 0x0, l = 8M
0030   ramdisk : org = 0x0800000, l = 8M
0031   dpram : org = 0x04700000, l = 128K
0032   flash : org = 0xff800000, l = 8M
0033 }
0034 
0035 
0036 SECTIONS
0037 {
0038     /*
0039      * The stack will live in this area - between the vectors and
0040      * the text section.
0041      */
0042 
0043     .text 0x10000:
0044     {
0045     _textbase = .;
0046 
0047 
0048     text.start = .;
0049 
0050     /* Entry point is the .entry section */
0051     *(.entry)
0052     *(.entry2)
0053 
0054     /* Actual Code */
0055     *(.text*)
0056 
0057 
0058     *(.rodata*)
0059     *(.rodata1)
0060 
0061 
0062     /*
0063      * Special FreeBSD sysctl sections.
0064      */
0065     . = ALIGN (16);
0066     __start_set_sysctl_set = .;
0067     *(set_sysctl_*);
0068     __stop_set_sysctl_set = ABSOLUTE(.);
0069     *(set_domain_*);
0070     *(set_pseudo_*);
0071 
0072     /* C++ constructors/destructors */
0073     *(.gnu.linkonce.t*)
0074 
0075     /*  Initialization and finalization code.
0076      *
0077      *  Various files can provide initialization and finalization functions.
0078      *  The bodies of these functions are in .init and .fini sections. We
0079      *  accumulate the bodies here, and prepend function prologues from
0080      *  ecrti.o and function epilogues from ecrtn.o. ecrti.o must be linked
0081      *  first; ecrtn.o must be linked last. Because these are wildcards, it
0082      *  doesn't matter if the user does not actually link against ecrti.o and
0083      *  ecrtn.o; the linker won't look for a file to match a wildcard.  The
0084      *  wildcard also means that it doesn't matter which directory ecrti.o
0085      *  and ecrtn.o are in.
0086      */
0087     PROVIDE (_init = .);
0088     *ecrti.o(.init)
0089     *(.init)
0090     *ecrtn.o(.init)
0091 
0092     PROVIDE (_fini = .);
0093     *ecrti.o(.fini)
0094     *(.fini)
0095     *ecrtn.o(.init)
0096 
0097     KEEP (*ecrti.o(.ctors))
0098     KEEP (*crtbegin.o(.ctors))
0099     KEEP (*crtbegin?.o(.ctors))
0100     KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o *ecrtn.o) .ctors))
0101     KEEP (*(SORT(.ctors.*)))
0102     KEEP (*(.ctors))
0103     KEEP (*ecrti.o(.dtors))
0104     KEEP (*crtbegin.o(.dtors))
0105     KEEP (*crtbegin?.o(.dtors))
0106     KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o *ecrtn.o) .dtors))
0107     KEEP (*(SORT(.dtors.*)))
0108     KEEP (*(.dtors))
0109 
0110     /* Exception frame info */
0111     *(.eh_frame)
0112 
0113     /* Miscellaneous read-only data */
0114     _rodata_start = . ;
0115     *(.gnu.linkonce.r*)
0116     *(.lit)
0117     *(.shdata)
0118     *(.rodata)
0119     *(.rodata1)
0120     KEEP (*(SORT(.rtemsroset.*)))
0121     *(.descriptors)
0122     *(rom_ver)
0123     _erodata = .;
0124 
0125 
0126     /* Various possible names for the end of the .text section */
0127     etext = ALIGN(0x10);
0128     _etext = .;
0129     _endtext = .;
0130     text.end = .;
0131     PROVIDE (etext = .);
0132     PROVIDE (__etext = .);
0133 
0134     } > ram
0135 
0136   .tdata : {
0137     _TLS_Data_begin = .;
0138     *(.tdata .tdata.* .gnu.linkonce.td.*)
0139     _TLS_Data_end = .;
0140   } >ram
0141 
0142   .tbss : {
0143     _TLS_BSS_begin = .;
0144     *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
0145     _TLS_BSS_end = .;
0146   } >ram
0147 
0148   _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
0149   _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
0150   _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
0151   _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
0152   _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
0153   _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
0154 
0155 
0156   .rel.dyn        :
0157     {
0158       *(.rel.init)
0159       *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
0160       *(.rel.fini)
0161       *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
0162       *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*)
0163       *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
0164       *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
0165       *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
0166       *(.rel.ctors)
0167       *(.rel.dtors)
0168       *(.rel.got)
0169       *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
0170       *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
0171       *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
0172       *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
0173       *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
0174     } >ram
0175   .rela.dyn       :
0176     {
0177       *(.rela.init)
0178       *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
0179       *(.rela.fini)
0180       *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
0181       *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
0182       *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
0183       *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
0184       *(.rela.ctors)
0185       *(.rela.dtors)
0186       *(.rela.got)
0187       *(.rela.got1)
0188       *(.rela.got2)
0189       *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
0190       *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
0191       *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
0192       *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
0193       *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
0194     } >ram
0195   .rel.plt        : { *(.rel.plt) }
0196   .rela.plt       : { *(.rela.plt) }
0197 
0198     PROVIDE (__EXCEPT_START__ = .);
0199     .gcc_except_table   : { *(.gcc_except_table*) } >ram
0200     PROVIDE (__EXCEPT_END__ = .);
0201     __GOT_START__ = .;
0202     .got :
0203     {
0204       s.got = .;
0205       *(.got.plt) *(.got)
0206     } > ram
0207     __GOT_END__ = .;
0208 
0209     .got1                 : { *(.got1)          } >ram
0210     PROVIDE (__GOT2_START__ = .);
0211     PROVIDE (_GOT2_START_ = .);
0212     .got2                 :  { *(.got2)         } >ram
0213     PROVIDE (__GOT2_END__ = .);
0214     PROVIDE (_GOT2_END_ = .);
0215 
0216     PROVIDE (__FIXUP_START__ = .);
0217     PROVIDE (_FIXUP_START_ = .);
0218     .fixup        : { *(.fixup)         } >ram
0219     PROVIDE (_FIXUP_END_ = .);
0220     PROVIDE (__FIXUP_END__ = .);
0221 
0222     .sdata : {
0223       bsp_section_sdata_begin = .;
0224       PROVIDE (_SDA_BASE_ = 32768);
0225       *(.sdata .sdata.* .gnu.linkonce.s.*)
0226       bsp_section_sdata_end = .;
0227   } > ram
0228 
0229     .sbss : {
0230       __bss_start = .;
0231       bsp_section_sbss_begin = .;
0232 
0233       PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);
0234       *(.scommon)
0235       *(.dynsbss)
0236       *(.sbss .sbss.* .gnu.linkonce.sb.*)
0237       PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);
0238       bsp_section_sbss_end = .;
0239       bsp_section_sdata_libdl_begin = .;
0240       . = DEFINED(bsp_section_small_data_area_size) ?
0241               bsp_section_sdata_begin + bsp_section_small_data_area_size : .;
0242       bsp_section_sdata_libdl_end = .;
0243     } > ram
0244 
0245     .sdata2 : {
0246       PROVIDE (_SDA2_BASE_ = 32768);
0247 
0248       *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
0249     } > ram =0
0250 
0251     .sbss2 : {
0252       *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
0253     } > ram =0
0254 
0255     .bss :
0256     {
0257       bss.start = .;
0258       *(.bss .bss* .gnu.linkonce.b*)
0259       . = ALIGN(4);
0260       bss.end = .;
0261     } > ram
0262 
0263     /* R/W Data */
0264     .data ( . ) :
0265     {
0266       . = ALIGN (4);
0267 
0268       data.start = .;
0269 
0270       *(.data)
0271       *(.data1)
0272       *(.data.* .gnu.linkonce.d.*)
0273       KEEP (*(SORT(.rtemsrwset.*)))
0274       PROVIDE (__SDATA_START__ = .);
0275       *(.sdata .sdata.* .gnu.linkonce.s.*)
0276       data.end = .;
0277     } > ram
0278 
0279     data.size = data.end - data.start;
0280     bss.size = bss.end - bss.start;
0281     text.size = text.end - text.start;
0282 
0283     PROVIDE(_end = data.end);
0284 
0285     .gzipmalloc : {
0286         . = ALIGN (16);
0287         _startmalloc = .;
0288      } >ram
0289 
0290     clear_end = .;
0291 
0292     .noinit (NOLOAD) : {
0293         *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
0294     } >ram
0295 
0296     .rtemsstack (NOLOAD) : {
0297         *(SORT(.rtemsstack.*))
0298     } >ram
0299 
0300     WorkAreaBase = .;
0301 
0302     /* Sections for compressed .text and .data         */
0303     /* after the .datarom section is an int specifying */
0304     /* the length of the following compressed image    */
0305     /* Executes once then could get overwritten        */
0306     .textrom 0x100000 :
0307     {
0308         *(.textrom)
0309         _endloader = .;
0310     } > ram
0311 
0312     .datarom :
0313     {
0314         _dr_start = .;
0315         *(.datarom)
0316         _dr_end = .;
0317     } > ram
0318     dr_len = _dr_end - _dr_start;
0319 
0320     .dpram :
0321     {
0322       m8260 = .;
0323       _m8260 = .;
0324       . += (128 * 1024);
0325      } > dpram
0326 
0327 
0328      /* the reset vector is at 0xfff00000 which is */
0329      /* located at offset 0x400000 from the base   */
0330      /* of flash                                   */
0331     .bootrom 0xFFF00000 :
0332     {
0333       *(.bootrom)
0334       _endboot = .;
0335     } > flash
0336 
0337 
0338     .line 0 : { *(.line) }
0339     .debug 0 : { *(.debug) }
0340     .debug_sfnames 0 : { *(.debug_sfnames) }
0341     .debug_srcinfo 0 : { *(.debug_srcinfo) }
0342     .debug_pubnames 0 : { *(.debug_pubnames) }
0343     .debug_aranges 0 : { *(.debug_aranges) }
0344     .debug_aregion 0 : { *(.debug_aregion) }
0345     .debug_macinfo 0 : { *(.debug_macinfo) }
0346     .stab 0 : { *(.stab) }
0347     .stabstr 0 : { *(.stabstr) }
0348 }