elf_x86_64_efi.lds 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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 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. *(.text.*)
  23. *(.gnu.linkonce.t.*)
  24. . = ALIGN(16);
  25. }
  26. _etext = .;
  27. _text_size = . - _text;
  28. . = ALIGN(4096);
  29. .reloc :
  30. {
  31. *(.reloc)
  32. }
  33. . = ALIGN(4096);
  34. .data :
  35. {
  36. _data = .;
  37. *(.rodata*)
  38. *(.got.plt)
  39. *(.got)
  40. *(.data*)
  41. *(.sdata)
  42. /* the EFI loader doesn't seem to like a .bss section, so we stick
  43. it all into .data: */
  44. *(.sbss)
  45. *(.scommon)
  46. *(.dynbss)
  47. *(.bss)
  48. *(COMMON)
  49. *(.rel.local)
  50. }
  51. .note.gnu.build-id : { *(.note.gnu.build-id) }
  52. _edata = .;
  53. _data_size = . - _etext;
  54. . = ALIGN(4096);
  55. .dynamic : { *(.dynamic) }
  56. . = ALIGN(4096);
  57. .rela :
  58. {
  59. *(.rela.data*)
  60. *(.rela.got)
  61. *(.rela.stab)
  62. }
  63. . = ALIGN(4096);
  64. .dynsym : { *(.dynsym) }
  65. . = ALIGN(4096);
  66. .dynstr : { *(.dynstr) }
  67. . = ALIGN(4096);
  68. .ignored.reloc :
  69. {
  70. *(.rela.reloc)
  71. *(.eh_frame)
  72. *(.note.GNU-stack)
  73. }
  74. .comment 0 : { *(.comment) }
  75. }