elf_ia64_efi.lds 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. *(.plt)
  21. . = ALIGN(16);
  22. }
  23. _etext = .;
  24. _text_size = _etext - _text;
  25. . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
  26. __gp = ALIGN (8) + 0x200000;
  27. .sdata :
  28. {
  29. _data = .;
  30. *(.got.plt)
  31. *(.got)
  32. *(.srodata)
  33. *(.sdata)
  34. *(.sbss)
  35. *(.scommon)
  36. }
  37. . = ALIGN(4096);
  38. .data :
  39. {
  40. *(.rodata*)
  41. *(.ctors)
  42. *(.data*)
  43. *(.gnu.linkonce.d*)
  44. *(.plabel) /* data whose relocs we want to ignore */
  45. /*
  46. * Note that these aren't the using the GNU "CONSTRUCTOR" output section
  47. * command, so they don't start with a size. Because of p2align and the
  48. * end/END definitions, and the fact that they're mergeable, they can also
  49. * have NULLs which aren't guaranteed to be at the end.
  50. */
  51. . = ALIGN(16);
  52. __init_array_start = .;
  53. *(SORT(.init_array.*))
  54. *(.init_array)
  55. __init_array_end = .;
  56. . = ALIGN(16);
  57. __CTOR_LIST__ = .;
  58. *(SORT(.ctors.*))
  59. *(.ctors)
  60. __CTOR_END__ = .;
  61. . = ALIGN(16);
  62. __DTOR_LIST__ = .;
  63. *(SORT(.dtors.*))
  64. *(.dtors)
  65. __DTOR_END__ = .;
  66. . = ALIGN(16);
  67. __fini_array_start = .;
  68. *(SORT(.fini_array.*))
  69. *(.fini_array)
  70. __fini_array_end = .;
  71. /* the EFI loader doesn't seem to like a .bss section, so we stick
  72. it all into .data: */
  73. *(.dynbss)
  74. *(.bss*)
  75. *(COMMON)
  76. }
  77. .note.gnu.build-id : { *(.note.gnu.build-id) }
  78. . = ALIGN(4096);
  79. .dynamic : { *(.dynamic) }
  80. . = ALIGN(4096);
  81. .rela :
  82. {
  83. *(.rela.text*)
  84. *(.rela.sdata*)
  85. *(.rela.data*)
  86. *(.rela.got)
  87. *(.rela.dyn)
  88. *(.rela.gnu.linkonce.d*)
  89. *(.rela.stab)
  90. *(.rela.init_array*)
  91. *(.rela.fini_array*)
  92. *(.rela.ctors*)
  93. *(.rela.dtors*)
  94. }
  95. . = ALIGN(4096);
  96. .rela.plt : { *(.rela.plt) }
  97. _edata = .;
  98. _data_size = _edata - _etext;
  99. . = ALIGN(4096);
  100. .reloc : /* This is the PECOFF .reloc section! */
  101. {
  102. KEEP (*(.reloc))
  103. }
  104. . = ALIGN(4096);
  105. .dynsym : { *(.dynsym) }
  106. . = ALIGN(4096);
  107. .dynstr : { *(.dynstr) }
  108. . = DATA_SEGMENT_END (.);
  109. /DISCARD/ :
  110. {
  111. *(.rela.plabel)
  112. *(.rela.reloc)
  113. *(.IA_64.unwind*)
  114. *(.IA64.unwind*)
  115. }
  116. }