elf_x86_64_fbsd_efi.lds 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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 = _etext - _text;
  26. .reloc :
  27. {
  28. *(.reloc)
  29. }
  30. . = ALIGN(4096);
  31. .data :
  32. {
  33. _data = .;
  34. *(.got.plt)
  35. *(.got)
  36. *(.data*)
  37. *(.sdata)
  38. /*
  39. * Note that these aren't the using the GNU "CONSTRUCTOR" output section
  40. * command, so they don't start with a size. Because of p2align and the
  41. * end/END definitions, and the fact that they're mergeable, they can also
  42. * have NULLs which aren't guaranteed to be at the end.
  43. */
  44. . = ALIGN(16);
  45. __init_array_start = .;
  46. *(SORT(.init_array.*))
  47. *(.init_array)
  48. __init_array_end = .;
  49. . = ALIGN(16);
  50. __CTOR_LIST__ = .;
  51. *(SORT(.ctors.*))
  52. *(.ctors)
  53. __CTOR_END__ = .;
  54. . = ALIGN(16);
  55. __DTOR_LIST__ = .;
  56. *(SORT(.dtors.*))
  57. *(.dtors)
  58. __DTOR_END__ = .;
  59. . = ALIGN(16);
  60. __fini_array_start = .;
  61. *(SORT(.fini_array.*))
  62. *(.fini_array)
  63. __fini_array_end = .;
  64. /* the EFI loader doesn't seem to like a .bss section, so we stick
  65. it all into .data: */
  66. *(.sbss)
  67. *(.scommon)
  68. *(.dynbss)
  69. *(.bss)
  70. *(COMMON)
  71. *(.rel.local)
  72. }
  73. .note.gnu.build-id : { *(.note.gnu.build-id) }
  74. . = ALIGN(4096);
  75. .dynamic : { *(.dynamic) }
  76. . = ALIGN(4096);
  77. .rela :
  78. {
  79. *(.rela.data*)
  80. *(.rela.got)
  81. *(.rela.stab)
  82. *(.rela.init_array*)
  83. *(.rela.fini_array*)
  84. *(.rela.ctors*)
  85. *(.rela.dtors*)
  86. }
  87. . = ALIGN(4096);
  88. .rodata : { *(.rodata*) }
  89. _edata = .;
  90. _data_size = _edata - _etext;
  91. . = ALIGN(4096);
  92. .dynsym : { *(.dynsym) }
  93. . = ALIGN(4096);
  94. .dynstr : { *(.dynstr) }
  95. . = ALIGN(4096);
  96. .ignored.reloc :
  97. {
  98. *(.rela.reloc)
  99. }
  100. }