elf_x86_64_fbsd_efi.lds 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /* Same as elf_x86_64_efi.lds, except for OUTPUT_FORMAT below - KEEP IN SYNC */
  2. OUTPUT_FORMAT("elf64-x86-64-freebsd", "elf64-x86-64-freebsd", "elf64-x86-64-freebsd")
  3. OUTPUT_ARCH(i386:x86-64)
  4. ENTRY(_start)
  5. SECTIONS
  6. {
  7. . = 0;
  8. ImageBase = .;
  9. /* .hash and/or .gnu.hash MUST come first! */
  10. .hash : { *(.hash) }
  11. .gnu.hash : { *(.gnu.hash) }
  12. . = ALIGN(4096);
  13. .eh_frame :
  14. {
  15. *(.eh_frame)
  16. }
  17. . = ALIGN(4096);
  18. .text :
  19. {
  20. _text = .;
  21. *(.text)
  22. . = ALIGN(16);
  23. }
  24. _etext = .;
  25. _text_size = . - _text;
  26. .reloc :
  27. {
  28. *(.reloc)
  29. }
  30. . = ALIGN(4096);
  31. .data :
  32. {
  33. _data = .;
  34. *(.rodata*)
  35. *(.got.plt)
  36. *(.got)
  37. *(.data*)
  38. *(.sdata)
  39. /*
  40. * Note that these aren't the using the GNU "CONSTRUCTOR" output section
  41. * command, so they don't start with a size. Because of p2align and the
  42. * end/END definitions, and the fact that they're mergeable, they can also
  43. * have NULLs which aren't guaranteed to be at the end.
  44. */
  45. . = ALIGN(16);
  46. __init_array_start = .;
  47. *(SORT(.init_array.*))
  48. *(.init_array)
  49. __init_array_end = .;
  50. . = ALIGN(16);
  51. __CTOR_LIST__ = .;
  52. *(SORT(.ctors.*))
  53. *(.ctors)
  54. __CTOR_END__ = .;
  55. . = ALIGN(16);
  56. __DTOR_LIST__ = .;
  57. *(SORT(.dtors.*))
  58. *(.dtors)
  59. __DTOR_END__ = .;
  60. . = ALIGN(16);
  61. __fini_array_start = .;
  62. *(SORT(.fini_array.*))
  63. *(.fini_array)
  64. __fini_array_end = .;
  65. /* the EFI loader doesn't seem to like a .bss section, so we stick
  66. it all into .data: */
  67. *(.sbss)
  68. *(.scommon)
  69. *(.dynbss)
  70. *(.bss)
  71. *(COMMON)
  72. *(.rel.local)
  73. }
  74. .note.gnu.build-id : { *(.note.gnu.build-id) }
  75. . = ALIGN(4096);
  76. .dynamic : { *(.dynamic) }
  77. . = ALIGN(4096);
  78. .rela :
  79. {
  80. *(.rela.data*)
  81. *(.rela.got)
  82. *(.rela.stab)
  83. *(.rela.init_array*)
  84. *(.rela.fini_array*)
  85. *(.rela.ctors*)
  86. *(.rela.dtors*)
  87. }
  88. _edata = .;
  89. _data_size = . - _etext;
  90. . = ALIGN(4096);
  91. .dynsym : { *(.dynsym) }
  92. . = ALIGN(4096);
  93. .dynstr : { *(.dynstr) }
  94. . = ALIGN(4096);
  95. .ignored.reloc :
  96. {
  97. *(.rela.reloc)
  98. }
  99. }