Home | History | Annotate | Download | only in ldscripts
      1 /* Script for ld -r: link without relocation */
      2 OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
      3 	      "elf32-littlearm")
      4 OUTPUT_ARCH(arm)
      5  /* For some reason, the Solaris linker makes bad executables
      6   if gld -r is used and the intermediate file has sections starting
      7   at non-zero addresses.  Could be a Solaris ld bug, could be a GNU ld
      8   bug.  But for now assigning the zero vmas works.  */
      9 SECTIONS
     10 {
     11   /* Read-only sections, merged into text segment: */
     12   .interp       0 : { *(.interp) }
     13   .note.gnu.build-id : { *(.note.gnu.build-id) }
     14   .hash         0 : { *(.hash) }
     15   .gnu.hash     0 : { *(.gnu.hash) }
     16   .dynsym       0 : { *(.dynsym) }
     17   .dynstr       0 : { *(.dynstr) }
     18   .gnu.version  0 : { *(.gnu.version) }
     19   .gnu.version_d 0: { *(.gnu.version_d) }
     20   .gnu.version_r 0: { *(.gnu.version_r) }
     21   .rel.init     0 : { *(.rel.init) }
     22   .rela.init    0 : { *(.rela.init) }
     23   .rel.text     0 : { *(.rel.text) }
     24   .rela.text    0 : { *(.rela.text) }
     25   .rel.fini     0 : { *(.rel.fini) }
     26   .rela.fini    0 : { *(.rela.fini) }
     27   .rel.rodata   0 : { *(.rel.rodata) }
     28   .rela.rodata  0 : { *(.rela.rodata) }
     29   .rel.data.rel.ro 0 : { *(.rel.data.rel.ro) }
     30   .rela.data.rel.ro 0 : { *(.rela.data.rel.ro) }
     31   .rel.data     0 : { *(.rel.data) }
     32   .rela.data    0 : { *(.rela.data) }
     33   .rel.tdata	0 : { *(.rel.tdata) }
     34   .rela.tdata	0 : { *(.rela.tdata) }
     35   .rel.tbss	0 : { *(.rel.tbss) }
     36   .rela.tbss	0 : { *(.rela.tbss) }
     37   .rel.ctors    0 : { *(.rel.ctors) }
     38   .rela.ctors   0 : { *(.rela.ctors) }
     39   .rel.dtors    0 : { *(.rel.dtors) }
     40   .rela.dtors   0 : { *(.rela.dtors) }
     41   .rel.got      0 : { *(.rel.got) }
     42   .rela.got     0 : { *(.rela.got) }
     43   .rel.bss      0 : { *(.rel.bss) }
     44   .rela.bss     0 : { *(.rela.bss) }
     45   .rel.iplt     0 :
     46     {
     47       *(.rel.iplt)
     48     }
     49   .rela.iplt    0 :
     50     {
     51       *(.rela.iplt)
     52     }
     53   .rel.plt      0 :
     54     {
     55       *(.rel.plt)
     56     }
     57   .rela.plt     0 :
     58     {
     59       *(.rela.plt)
     60     }
     61   .init         0 :
     62   {
     63     KEEP (*(.init))
     64   }
     65   .plt          0 : { *(.plt) }
     66   .iplt         0 : { *(.iplt) }
     67   .text         0 :
     68   {
     69     *(.text .stub)
     70     /* .gnu.warning sections are handled specially by elf32.em.  */
     71     *(.gnu.warning)
     72   }
     73   .fini         0 :
     74   {
     75     KEEP (*(.fini))
     76   }
     77   .rodata       0 : { *(.rodata) }
     78   .rodata1      0 : { *(.rodata1) }
     79   .ARM.extab 0 : { *(.ARM.extab) }
     80   .ARM.exidx 0 : { *(.ARM.exidx) }
     81   .eh_frame_hdr : { *(.eh_frame_hdr) }
     82   .eh_frame     0 : ONLY_IF_RO { KEEP (*(.eh_frame)) }
     83   .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table
     84   .gcc_except_table.*) }
     85   /* These sections are generated by the Sun/Oracle C++ compiler.  */
     86   .exception_ranges 0 : ONLY_IF_RO { *(.exception_ranges
     87   .exception_ranges*) }
     88   /* Adjust the address for the data segment.  We want to align at exactly
     89      a page boundary to make life easier for apriori. */
     90   /* Exception handling  */
     91   .eh_frame     0 : ONLY_IF_RW { KEEP (*(.eh_frame)) }
     92   .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
     93   .exception_ranges 0 : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) }
     94   /* Thread Local Storage sections  */
     95   .tdata	0 : { *(.tdata) }
     96   .tbss		0 : { *(.tbss) }
     97   /* Ensure the __preinit_array_start label is properly aligned.  We
     98      could instead move the label definition inside the section, but
     99      the linker would then create the section even if it turns out to
    100      be empty, which isn't pretty.  */
    101   . = ALIGN(32 / 8);
    102   .preinit_array   0 :
    103   {
    104     KEEP (*(.preinit_array))
    105   }
    106   .jcr          0 : { KEEP (*(.jcr)) }
    107   .dynamic      0 : { *(.dynamic) }
    108   .got          0 : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) }
    109   .data         0 :
    110   {
    111     *(.data)
    112   }
    113   .data1        0 : { *(.data1) }
    114   .bss          0 :
    115   {
    116    *(.dynbss)
    117    *(.bss)
    118    *(COMMON)
    119    /* Align here to ensure that the .bss section occupies space up to
    120       _end.  Align after .bss to ensure correct alignment even if the
    121       .bss section disappears because there are no input sections.  */
    122   }
    123   /* Stabs debugging sections.  */
    124   .stab          0 : { *(.stab) }
    125   .stabstr       0 : { *(.stabstr) }
    126   .stab.excl     0 : { *(.stab.excl) }
    127   .stab.exclstr  0 : { *(.stab.exclstr) }
    128   .stab.index    0 : { *(.stab.index) }
    129   .stab.indexstr 0 : { *(.stab.indexstr) }
    130   .comment       0 : { *(.comment) }
    131   /* DWARF debug sections.
    132      Symbols in the DWARF debugging sections are relative to the beginning
    133      of the section so we begin them at 0.  */
    134   /* DWARF 1 */
    135   .debug          0 : { *(.debug) }
    136   .line           0 : { *(.line) }
    137   /* GNU DWARF 1 extensions */
    138   .debug_srcinfo  0 : { *(.debug_srcinfo) }
    139   .debug_sfnames  0 : { *(.debug_sfnames) }
    140   /* DWARF 1.1 and DWARF 2 */
    141   .debug_aranges  0 : { *(.debug_aranges) }
    142   .debug_pubnames 0 : { *(.debug_pubnames) }
    143   /* DWARF 2 */
    144   .debug_info     0 : { *(.debug_info) }
    145   .debug_abbrev   0 : { *(.debug_abbrev) }
    146   .debug_line     0 : { *(.debug_line) }
    147   .debug_frame    0 : { *(.debug_frame) }
    148   .debug_str      0 : { *(.debug_str) }
    149   .debug_loc      0 : { *(.debug_loc) }
    150   .debug_macinfo  0 : { *(.debug_macinfo) }
    151   /* SGI/MIPS DWARF 2 extensions */
    152   .debug_weaknames 0 : { *(.debug_weaknames) }
    153   .debug_funcnames 0 : { *(.debug_funcnames) }
    154   .debug_typenames 0 : { *(.debug_typenames) }
    155   .debug_varnames  0 : { *(.debug_varnames) }
    156   /* DWARF 3 */
    157   .debug_pubtypes 0 : { *(.debug_pubtypes) }
    158   .debug_ranges   0 : { *(.debug_ranges) }
    159   /* DWARF Extension.  */
    160   .debug_macro    0 : { *(.debug_macro) }
    161     .stack        0 :
    162   {
    163     *(.stack)
    164   }
    165   .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }
    166   .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
    167 }
    168