elf_ia64_efi.lds 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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_start = .;
  52. *(SORT(.init_array.*))
  53. *(.init_array)
  54. __init_array_end = .;
  55. . = ALIGN(16);
  56. __CTOR_LIST__ = .;
  57. *(SORT(.ctors.*))
  58. *(.ctors)
  59. __CTOR_END__ = .;
  60. . = ALIGN(16);
  61. __DTOR_LIST__ = .;
  62. *(SORT(.dtors.*))
  63. *(.dtors)
  64. __DTOR_END__ = .;
  65. . = ALIGN(16);
  66. __fini_array_start = .;
  67. *(SORT(.fini_array.*))
  68. *(.fini_array)
  69. __fini_array_end = .;
  70. /* the EFI loader doesn't seem to like a .bss section, so we stick
  71. it all into .data: */
  72. *(.dynbss)
  73. *(.bss*)
  74. *(COMMON)
  75. }
  76. .note.gnu.build-id : { *(.note.gnu.build-id) }
  77. . = ALIGN(4096);
  78. .dynamic : { *(.dynamic) }
  79. . = ALIGN(4096);
  80. .rela :
  81. {
  82. *(.rela.text*)
  83. *(.rela.sdata*)
  84. *(.rela.data*)
  85. *(.rela.got)
  86. *(.rela.dyn)
  87. *(.rela.gnu.linkonce.d*)
  88. *(.rela.stab)
  89. *(.rela.init_array*)
  90. *(.rela.fini_array*)
  91. *(.rela.ctors*)
  92. *(.rela.dtors*)
  93. }
  94. . = ALIGN(4096);
  95. .rela.plt : { *(.rela.plt) }
  96. _edata = .;
  97. _data_size = . - _etext;
  98. . = ALIGN(4096);
  99. .reloc : /* This is the PECOFF .reloc section! */
  100. {
  101. KEEP (*(.reloc))
  102. }
  103. . = ALIGN(4096);
  104. .dynsym : { *(.dynsym) }
  105. . = ALIGN(4096);
  106. .dynstr : { *(.dynstr) }
  107. . = DATA_SEGMENT_END (.);
  108. /DISCARD/ :
  109. {
  110. *(.rela.plabel)
  111. *(.rela.reloc)
  112. *(.IA_64.unwind*)
  113. *(.IA64.unwind*)
  114. }
  115. }