elf_aarch64_efi.lds 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
  2. OUTPUT_ARCH(aarch64)
  3. ENTRY(_start)
  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. . = ALIGN(4096);
  12. .eh_frame : { *(.eh_frame) }
  13. .gcc_except_table : { *(.gcc_except_table*) }
  14. . = ALIGN(4096);
  15. .text : {
  16. _text = .;
  17. *(.text)
  18. *(.text.*)
  19. *(.gnu.linkonce.t.*)
  20. *(.srodata)
  21. *(.rodata*)
  22. . = ALIGN(16);
  23. }
  24. _etext = .;
  25. _text_size = . - _text;
  26. . = ALIGN(4096);
  27. .reloc :
  28. {
  29. KEEP (*(.reloc))
  30. }
  31. . = ALIGN(65536);
  32. .dynamic : { *(.dynamic) }
  33. . = ALIGN(4096);
  34. .data :
  35. {
  36. _data = .;
  37. *(.sdata)
  38. *(.data)
  39. *(.data1)
  40. *(.data.*)
  41. *(.got.plt)
  42. *(.got)
  43. /*
  44. * Note that these aren't the using the GNU "CONSTRUCTOR" output section
  45. * command, so they don't start with a size. Because of p2align and the
  46. * end/END definitions, and the fact that they're mergeable, they can also
  47. * have NULLs which aren't guaranteed to be at the end.
  48. */
  49. . = ALIGN(16);
  50. _init_array = .;
  51. *(SORT_BY_NAME(.init_array))
  52. _init_array_end = .;
  53. __CTOR_LIST__ = .;
  54. *(SORT_BY_NAME(.ctors))
  55. __CTOR_END__ = .;
  56. __DTOR_LIST__ = .;
  57. *(SORT_BY_NAME(.dtors))
  58. __DTOR_END__ = .;
  59. _fini_array = .;
  60. *(SORT_BY_NAME(.fini_array))
  61. _fini_array_end = .;
  62. /* the EFI loader doesn't seem to like a .bss section, so we stick
  63. it all into .data: */
  64. . = ALIGN(16);
  65. _bss = .;
  66. *(.sbss)
  67. *(.scommon)
  68. *(.dynbss)
  69. *(.bss*)
  70. *(COMMON)
  71. *(.rel.local)
  72. . = ALIGN(16);
  73. _bss_end = .;
  74. }
  75. . = ALIGN(4096);
  76. .rela :
  77. {
  78. *(.rela.text*)
  79. *(.rela.data*)
  80. *(.rela.got)
  81. *(.rela.dyn)
  82. *(.rela.stab)
  83. }
  84. . = ALIGN(4096);
  85. .rela.plt : { *(.rela.plt) }
  86. . = ALIGN(512);
  87. _edata = .;
  88. _data_size = . - _data;
  89. . = ALIGN(4096);
  90. .dynsym : { *(.dynsym) }
  91. . = ALIGN(4096);
  92. .dynstr : { *(.dynstr) }
  93. . = ALIGN(4096);
  94. .note.gnu.build-id : { *(.note.gnu.build-id) }
  95. .ignored.reloc :
  96. {
  97. *(.rela.reloc)
  98. *(.note.GNU-stack)
  99. }
  100. .comment 0 : { *(.comment) }
  101. }