home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / lib / ldscripts / elf_x86_64.xu < prev    next >
Encoding:
LD Linker Script  |  2006-06-28  |  5.2 KB  |  165 lines

  1. /* Script for ld -Ur: link w/out relocation, do create constructors */
  2. OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",
  3.           "elf64-x86-64")
  4. OUTPUT_ARCH(i386:x86-64)
  5. ENTRY(_start)
  6.  /* For some reason, the Solaris linker makes bad executables
  7.   if gld -r is used and the intermediate file has sections starting
  8.   at non-zero addresses.  Could be a Solaris ld bug, could be a GNU ld
  9.   bug.  But for now assigning the zero vmas works.  */
  10. SECTIONS
  11. {
  12.   /* Read-only sections, merged into text segment: */
  13.   .interp       0 : { *(.interp) }
  14.   .hash         0 : { *(.hash) }
  15.   .dynsym       0 : { *(.dynsym) }
  16.   .dynstr       0 : { *(.dynstr) }
  17.   .gnu.version  0 : { *(.gnu.version) }
  18.   .gnu.version_d 0: { *(.gnu.version_d) }
  19.   .gnu.version_r 0: { *(.gnu.version_r) }
  20.   .rel.init     0 : { *(.rel.init) }
  21.   .rela.init    0 : { *(.rela.init) }
  22.   .rel.text     0 : { *(.rel.text) }
  23.   .rela.text    0 : { *(.rela.text) }
  24.   .rel.fini     0 : { *(.rel.fini) }
  25.   .rela.fini    0 : { *(.rela.fini) }
  26.   .rel.rodata   0 : { *(.rel.rodata) }
  27.   .rela.rodata  0 : { *(.rela.rodata) }
  28.   .rel.data.rel.ro 0 : { *(.rel.data.rel.ro) }
  29.   .rela.data.rel.ro 0 : { *(.rela.data.rel.ro) }
  30.   .rel.data     0 : { *(.rel.data) }
  31.   .rela.data    0 : { *(.rela.data) }
  32.   .rel.tdata    0 : { *(.rel.tdata) }
  33.   .rela.tdata    0 : { *(.rela.tdata) }
  34.   .rel.tbss    0 : { *(.rel.tbss) }
  35.   .rela.tbss    0 : { *(.rela.tbss) }
  36.   .rel.ctors    0 : { *(.rel.ctors) }
  37.   .rela.ctors   0 : { *(.rela.ctors) }
  38.   .rel.dtors    0 : { *(.rel.dtors) }
  39.   .rela.dtors   0 : { *(.rela.dtors) }
  40.   .rel.got      0 : { *(.rel.got) }
  41.   .rela.got     0 : { *(.rela.got) }
  42.   .rel.bss      0 : { *(.rel.bss) }
  43.   .rela.bss     0 : { *(.rela.bss) }
  44.   .rel.ldata    0 : { *(.rel.ldata) }
  45.   .rela.ldata   0 : { *(.rela.ldata) }
  46.   .rel.lbss     0 : { *(.rel.lbss) }
  47.   .rela.lbss    0 : { *(.rela.lbss) }
  48.   .rel.lrodata  0 : { *(.rel.lrodata) }
  49.   .rela.lrodata 0 : { *(.rela.lrodata) }
  50.   .rel.plt      0 : { *(.rel.plt) }
  51.   .rela.plt     0 : { *(.rela.plt) }
  52.   .init         0 :
  53.   {
  54.     KEEP (*(.init))
  55.   } =0x90909090
  56.   .plt          0 : { *(.plt) }
  57.   .text         0 :
  58.   {
  59.     *(.text .stub)
  60.     KEEP (*(.text.*personality*))
  61.     /* .gnu.warning sections are handled specially by elf32.em.  */
  62.     *(.gnu.warning)
  63.   } =0x90909090
  64.   .fini         0 :
  65.   {
  66.     KEEP (*(.fini))
  67.   } =0x90909090
  68.   .rodata       0 : { *(.rodata) }
  69.   .rodata1      0 : { *(.rodata1) }
  70.   .eh_frame_hdr : { *(.eh_frame_hdr) }
  71.   .eh_frame     0 : ONLY_IF_RO { KEEP (*(.eh_frame)) }
  72.   .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
  73.   /* Adjust the address for the data segment.  We want to adjust up to
  74.      the same address within the page on the next page up.  */
  75.   /* Exception handling  */
  76.   .eh_frame     0 : ONLY_IF_RW { KEEP (*(.eh_frame)) }
  77.   .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
  78.   /* Thread Local Storage sections  */
  79.   .tdata    0 : { *(.tdata) }
  80.   .tbss        0 : { *(.tbss) }
  81.   .preinit_array   0 :
  82.   {
  83.     KEEP (*(.preinit_array))
  84.   }
  85.   .init_array   0 :
  86.   {
  87.      KEEP (*(SORT(.init_array.*)))
  88.      KEEP (*(.init_array))
  89.   }
  90.   .fini_array   0 :
  91.   {
  92.     KEEP (*(.fini_array))
  93.     KEEP (*(SORT(.fini_array.*)))
  94.   }
  95.   .jcr          0 : { KEEP (*(.jcr)) }
  96.   .dynamic      0 : { *(.dynamic) }
  97.   .got          0 : { *(.got) }
  98.   .got.plt      0 : { *(.got.plt) }
  99.   .data         0 :
  100.   {
  101.     *(.data)
  102.     KEEP (*(.gnu.linkonce.d.*personality*))
  103.     SORT(CONSTRUCTORS)
  104.   }
  105.   .data1        0 : { *(.data1) }
  106.   .bss          0 :
  107.   {
  108.    *(.dynbss)
  109.    *(.bss)
  110.    *(COMMON)
  111.    /* Align here to ensure that the .bss section occupies space up to
  112.       _end.  Align after .bss to ensure correct alignment even if the
  113.       .bss section disappears because there are no input sections.
  114.       FIXME: Why do we need it? When there is no .bss section, we don't
  115.       pad the .data section.  */
  116.   }
  117.   .lbss 0 :
  118.   {
  119.     *(.dynlbss)
  120.     *(.lbss)
  121.     *(LARGE_COMMON)
  122.   }
  123.   .lrodata 0  :
  124.   {
  125.     *(.lrodata)
  126.   }
  127.   .ldata 0  :
  128.   {
  129.     *(.ldata)
  130.   }
  131.   /* Stabs debugging sections.  */
  132.   .stab          0 : { *(.stab) }
  133.   .stabstr       0 : { *(.stabstr) }
  134.   .stab.excl     0 : { *(.stab.excl) }
  135.   .stab.exclstr  0 : { *(.stab.exclstr) }
  136.   .stab.index    0 : { *(.stab.index) }
  137.   .stab.indexstr 0 : { *(.stab.indexstr) }
  138.   .comment       0 : { *(.comment) }
  139.   /* DWARF debug sections.
  140.      Symbols in the DWARF debugging sections are relative to the beginning
  141.      of the section so we begin them at 0.  */
  142.   /* DWARF 1 */
  143.   .debug          0 : { *(.debug) }
  144.   .line           0 : { *(.line) }
  145.   /* GNU DWARF 1 extensions */
  146.   .debug_srcinfo  0 : { *(.debug_srcinfo) }
  147.   .debug_sfnames  0 : { *(.debug_sfnames) }
  148.   /* DWARF 1.1 and DWARF 2 */
  149.   .debug_aranges  0 : { *(.debug_aranges) }
  150.   .debug_pubnames 0 : { *(.debug_pubnames) }
  151.   /* DWARF 2 */
  152.   .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
  153.   .debug_abbrev   0 : { *(.debug_abbrev) }
  154.   .debug_line     0 : { *(.debug_line) }
  155.   .debug_frame    0 : { *(.debug_frame) }
  156.   .debug_str      0 : { *(.debug_str) }
  157.   .debug_loc      0 : { *(.debug_loc) }
  158.   .debug_macinfo  0 : { *(.debug_macinfo) }
  159.   /* SGI/MIPS DWARF 2 extensions */
  160.   .debug_weaknames 0 : { *(.debug_weaknames) }
  161.   .debug_funcnames 0 : { *(.debug_funcnames) }
  162.   .debug_typenames 0 : { *(.debug_typenames) }
  163.   .debug_varnames  0 : { *(.debug_varnames) }
  164. }
  165.