elf_ia32_fbsd_efi.lds 2.1 KB

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