elf_x86_64_efi.lds 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* Same as elf_x86_64_fbsd_efi.lds, except for OUTPUT_FORMAT below - KEEP IN SYNC */
  2. OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
  3. OUTPUT_ARCH(i386:x86-64)
  4. ENTRY(_start)
  5. SECTIONS
  6. {
  7. . = 0;
  8. ImageBase = .;
  9. .hash : { *(.hash) } /* this MUST come first! */
  10. . = ALIGN(4096);
  11. .eh_frame :
  12. {
  13. *(.eh_frame)
  14. }
  15. . = ALIGN(4096);
  16. .text :
  17. {
  18. _text = .;
  19. *(.text)
  20. *(.text.*)
  21. *(.gnu.linkonce.t.*)
  22. . = ALIGN(16);
  23. }
  24. _etext = .;
  25. _text_size = . - _text;
  26. . = ALIGN(4096);
  27. .reloc :
  28. {
  29. *(.reloc)
  30. }
  31. . = ALIGN(4096);
  32. .data :
  33. {
  34. _data = .;
  35. *(.rodata*)
  36. *(.got.plt)
  37. *(.got)
  38. *(.data*)
  39. *(.sdata)
  40. /* the EFI loader doesn't seem to like a .bss section, so we stick
  41. it all into .data: */
  42. *(.sbss)
  43. *(.scommon)
  44. *(.dynbss)
  45. *(.bss)
  46. *(COMMON)
  47. *(.rel.local)
  48. }
  49. .note.gnu.build-id : { *(.note.gnu.build-id) }
  50. _edata = .;
  51. _data_size = . - _etext;
  52. . = ALIGN(4096);
  53. .dynamic : { *(.dynamic) }
  54. . = ALIGN(4096);
  55. .rela :
  56. {
  57. *(.rela.data*)
  58. *(.rela.got)
  59. *(.rela.stab)
  60. }
  61. . = ALIGN(4096);
  62. .dynsym : { *(.dynsym) }
  63. . = ALIGN(4096);
  64. .dynstr : { *(.dynstr) }
  65. . = ALIGN(4096);
  66. .ignored.reloc :
  67. {
  68. *(.rela.reloc)
  69. *(.eh_frame)
  70. *(.note.GNU-stack)
  71. }
  72. .comment 0 : { *(.comment) }
  73. }