elf_ia64_efi.lds 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. OUTPUT_FORMAT("elf64-ia64-little")
  2. OUTPUT_ARCH(ia64)
  3. ENTRY(_start_plabel)
  4. SECTIONS
  5. {
  6. . = 0;
  7. ImageBase = .;
  8. /* .hash and/or .gnu.hash MUST come first! */
  9. .hash : { *(.hash) }
  10. .gnu.hash : { *(.gnu.hash) }
  11. .eh_frame : { *(.eh_frame) }
  12. .gcc_except_table : { *(.gcc_except_table*) }
  13. . = ALIGN(4096);
  14. .text :
  15. {
  16. _text = .;
  17. *(.text)
  18. *(.text.*)
  19. *(.gnu.linkonce.t.*)
  20. . = ALIGN(16);
  21. }
  22. _etext = .;
  23. _text_size = . - _text;
  24. . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
  25. __gp = ALIGN (8) + 0x200000;
  26. .sdata :
  27. {
  28. _data = .;
  29. *(.got.plt)
  30. *(.got)
  31. *(.srodata)
  32. *(.sdata)
  33. *(.sbss)
  34. *(.scommon)
  35. }
  36. . = ALIGN(4096);
  37. .data :
  38. {
  39. *(.rodata*)
  40. *(.ctors)
  41. *(.data*)
  42. *(.gnu.linkonce.d*)
  43. *(.plabel) /* data whose relocs we want to ignore */
  44. /*
  45. * Note that these aren't the using the GNU "CONSTRUCTOR" output section
  46. * command, so they don't start with a size. Because of p2align and the
  47. * end/END definitions, and the fact that they're mergeable, they can also
  48. * have NULLs which aren't guaranteed to be at the end.
  49. */
  50. . = ALIGN(16);
  51. _init_array = .;
  52. *(SORT_BY_NAME(.init_array))
  53. _init_array_end = .;
  54. __CTOR_LIST__ = .;
  55. *(SORT_BY_NAME(.ctors))
  56. __CTOR_END__ = .;
  57. __DTOR_LIST__ = .;
  58. *(SORT_BY_NAME(.dtors))
  59. __DTOR_END__ = .;
  60. _fini_array = .;
  61. *(SORT_BY_NAME(.fini_array))
  62. _fini_array_end = .;
  63. /* the EFI loader doesn't seem to like a .bss section, so we stick
  64. it all into .data: */
  65. *(.dynbss)
  66. *(.bss*)
  67. *(COMMON)
  68. }
  69. .note.gnu.build-id : { *(.note.gnu.build-id) }
  70. . = ALIGN(4096);
  71. .dynamic : { *(.dynamic) }
  72. . = ALIGN(4096);
  73. .rela :
  74. {
  75. *(.rela.text*)
  76. *(.rela.sdata*)
  77. *(.rela.data*)
  78. *(.rela.got)
  79. *(.rela.dyn)
  80. *(.rela.gnu.linkonce.d*)
  81. *(.rela.stab)
  82. *(.rela.ctors)
  83. }
  84. . = ALIGN(4096);
  85. .rela.plt : { *(.rela.plt) }
  86. _edata = .;
  87. _data_size = . - _etext;
  88. . = ALIGN(4096);
  89. .reloc : /* This is the PECOFF .reloc section! */
  90. {
  91. KEEP (*(.reloc))
  92. }
  93. . = ALIGN(4096);
  94. .dynsym : { *(.dynsym) }
  95. . = ALIGN(4096);
  96. .dynstr : { *(.dynstr) }
  97. . = DATA_SEGMENT_END (.);
  98. /DISCARD/ :
  99. {
  100. *(.rela.plabel)
  101. *(.rela.reloc)
  102. *(.IA_64.unwind*)
  103. *(.IA64.unwind*)
  104. }
  105. }