elf_x86_64_fbsd_efi.lds 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 = .;
  47. *(SORT_BY_NAME(.init_array))
  48. _init_array_end = .;
  49. __CTOR_LIST__ = .;
  50. *(SORT_BY_NAME(.ctors))
  51. __CTOR_END__ = .;
  52. __DTOR_LIST__ = .;
  53. *(SORT_BY_NAME(.dtors))
  54. __DTOR_END__ = .;
  55. _fini_array = .;
  56. *(SORT_BY_NAME(.fini_array))
  57. _fini_array_end = .;
  58. /* the EFI loader doesn't seem to like a .bss section, so we stick
  59. it all into .data: */
  60. *(.sbss)
  61. *(.scommon)
  62. *(.dynbss)
  63. *(.bss)
  64. *(COMMON)
  65. *(.rel.local)
  66. }
  67. .note.gnu.build-id : { *(.note.gnu.build-id) }
  68. . = ALIGN(4096);
  69. .dynamic : { *(.dynamic) }
  70. . = ALIGN(4096);
  71. .rela :
  72. {
  73. *(.rela.data*)
  74. *(.rela.got)
  75. *(.rela.stab)
  76. }
  77. _edata = .;
  78. _data_size = . - _etext;
  79. . = ALIGN(4096);
  80. .dynsym : { *(.dynsym) }
  81. . = ALIGN(4096);
  82. .dynstr : { *(.dynstr) }
  83. . = ALIGN(4096);
  84. .ignored.reloc :
  85. {
  86. *(.rela.reloc)
  87. }
  88. }