Home | History | Annotate | Download | only in ldscripts
      1 /* Script for ld -Ur: link w/out relocation, do create constructors */
      2 OUTPUT_FORMAT("elf32-i386", "elf32-i386",
      3 	      "elf32-i386")
      4 OUTPUT_ARCH(i386)
      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   .rel.text     0 : { *(.rel.text) }
     23   .rel.fini     0 : { *(.rel.fini) }
     24   .rel.rodata   0 : { *(.rel.rodata) }
     25   .rel.data.rel.ro 0 : { *(.rel.data.rel.ro) }
     26   .rel.data     0 : { *(.rel.data) }
     27   .rel.tdata	0 : { *(.rel.tdata) }
     28   .rel.tbss	0 : { *(.rel.tbss) }
     29   .rel.ctors    0 : { *(.rel.ctors) }
     30   .rel.dtors    0 : { *(.rel.dtors) }
     31   .rel.got      0 : { *(.rel.got) }
     32   .rel.bss      0 : { *(.rel.bss) }
     33   .rel.ifunc    0 : { *(.rel.ifunc) }
     34   .rel.plt      0 :
     35     {
     36       *(.rel.plt)
     37     }
     38   .init         0 :
     39   {
     40     KEEP (*(.init))
     41   } =0x90909090
     42   .plt          0 : { *(.plt) *(.iplt) }
     43   .text         0 :
     44   {
     45     *(.text .stub)
     46     /* .gnu.warning sections are handled specially by elf32.em.  */
     47     *(.gnu.warning)
     48   } =0x90909090
     49   .fini         0 :
     50   {
     51     KEEP (*(.fini))
     52   } =0x90909090
     53   .rodata       0 : { *(.rodata) }
     54   .rodata1      0 : { *(.rodata1) }
     55   .eh_frame_hdr : { *(.eh_frame_hdr) }
     56   .eh_frame     0 : ONLY_IF_RO { KEEP (*(.eh_frame)) }
     57   .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
     58   /* Adjust the address for the data segment.  We want to align at exactly
     59      a page boundary to make life easier for apriori. */
     60   /* Exception handling  */
     61   .eh_frame     0 : ONLY_IF_RW { KEEP (*(.eh_frame)) }
     62   .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
     63   /* Thread Local Storage sections  */
     64   .tdata	0 : { *(.tdata) }
     65   .tbss		0 : { *(.tbss) }
     66   /* Ensure the __preinit_array_start label is properly aligned.  We
     67      could instead move the label definition inside the section, but
     68      the linker would then create the section even if it turns out to
     69      be empty, which isn't pretty.  */
     70   . = ALIGN(32 / 8);
     71   .preinit_array   0 :
     72   {
     73     KEEP (*(.preinit_array))
     74   }
     75   .jcr          0 : { KEEP (*(.jcr)) }
     76   .dynamic      0 : { *(.dynamic) }
     77   .got          0 : { *(.got) *(.igot) }
     78   .got.plt      0 : { *(.got.plt)  *(.igot.plt) }
     79   .data         0 :
     80   {
     81     *(.data)
     82     SORT(CONSTRUCTORS)
     83   }
     84   .data1        0 : { *(.data1) }
     85   .bss          0 :
     86   {
     87    *(.dynbss)
     88    *(.bss)
     89    *(COMMON)
     90    /* Align here to ensure that the .bss section occupies space up to
     91       _end.  Align after .bss to ensure correct alignment even if the
     92       .bss section disappears because there are no input sections.  */
     93   }
     94   /* Stabs debugging sections.  */
     95   .stab          0 : { *(.stab) }
     96   .stabstr       0 : { *(.stabstr) }
     97   .stab.excl     0 : { *(.stab.excl) }
     98   .stab.exclstr  0 : { *(.stab.exclstr) }
     99   .stab.index    0 : { *(.stab.index) }
    100   .stab.indexstr 0 : { *(.stab.indexstr) }
    101   .comment       0 : { *(.comment) }
    102   /* DWARF debug sections.
    103      Symbols in the DWARF debugging sections are relative to the beginning
    104      of the section so we begin them at 0.  */
    105   /* DWARF 1 */
    106   .debug          0 : { *(.debug) }
    107   .line           0 : { *(.line) }
    108   /* GNU DWARF 1 extensions */
    109   .debug_srcinfo  0 : { *(.debug_srcinfo .zdebug_srcinfo) }
    110   .debug_sfnames  0 : { *(.debug_sfnames .zdebug_sfnames) }
    111   /* DWARF 1.1 and DWARF 2 */
    112   .debug_aranges  0 : { *(.debug_aranges .zdebug_aranges) }
    113   .debug_pubnames 0 : { *(.debug_pubnames .zdebug_pubnames) }
    114   /* DWARF 2 */
    115   .debug_info     0 : { *(.debug_info .zdebug_info) }
    116   .debug_abbrev   0 : { *(.debug_abbrev .zdebug_abbrev) }
    117   .debug_line     0 : { *(.debug_line .zdebug_line) }
    118   .debug_frame    0 : { *(.debug_frame .zdebug_frame) }
    119   .debug_str      0 : { *(.debug_str .zdebug_str) }
    120   .debug_loc      0 : { *(.debug_loc .zdebug_loc) }
    121   .debug_macinfo  0 : { *(.debug_macinfo .zdebug_macinfo) }
    122   /* SGI/MIPS DWARF 2 extensions */
    123   .debug_weaknames 0 : { *(.debug_weaknames .zdebug_weaknames) }
    124   .debug_funcnames 0 : { *(.debug_funcnames .zdebug_funcnames) }
    125   .debug_typenames 0 : { *(.debug_typenames .zdebug_typenames) }
    126   .debug_varnames  0 : { *(.debug_varnames .zdebug_varnames) }
    127   /* DWARF 3 */
    128   .debug_pubtypes 0 : { *(.debug_pubtypes .zdebug_pubtypes) }
    129   .debug_ranges   0 : { *(.debug_ranges .zdebug_ranges) }
    130   .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
    131 }
    132