elf_ia32_fbsd_efi.lds 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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_start = .;
  51. *(SORT(.init_array.*))
  52. *(.init_array)
  53. __init_array_end = .;
  54. __CTOR_LIST__ = .;
  55. *(SORT(.ctors.*))
  56. *(.ctors)
  57. __CTOR_END__ = .;
  58. __DTOR_LIST__ = .;
  59. *(SORT(.dtors.*))
  60. *(.dtors)
  61. __DTOR_END__ = .;
  62. __fini_array_start = .;
  63. *(SORT(.fini_array.*))
  64. *(.fini_array)
  65. __fini_array_end = .;
  66. /* the EFI loader doesn't seem to like a .bss section, so we stick
  67. it all into .data: */
  68. *(.sbss)
  69. *(.scommon)
  70. *(.dynbss)
  71. *(.bss)
  72. *(COMMON)
  73. }
  74. .note.gnu.build-id : { *(.note.gnu.build-id) }
  75. . = ALIGN(4096);
  76. .dynamic : { *(.dynamic) }
  77. . = ALIGN(4096);
  78. .rel :
  79. {
  80. *(.rel.data)
  81. *(.rel.data.*)
  82. *(.rel.got)
  83. *(.rel.stab)
  84. *(.rel.init_array*)
  85. *(.rel.fini_array*)
  86. *(.rel.ctors*)
  87. *(.rel.dtors*)
  88. *(.data.rel.ro.local)
  89. *(.data.rel.local)
  90. *(.data.rel.ro)
  91. *(.data.rel*)
  92. }
  93. _edata = .;
  94. _data_size = . - _etext;
  95. . = ALIGN(4096);
  96. .reloc : /* This is the PECOFF .reloc section! */
  97. {
  98. *(.reloc)
  99. }
  100. . = ALIGN(4096);
  101. .dynsym : { *(.dynsym) }
  102. . = ALIGN(4096);
  103. .dynstr : { *(.dynstr) }
  104. . = ALIGN(4096);
  105. /DISCARD/ :
  106. {
  107. *(.rel.reloc)
  108. *(.eh_frame)
  109. *(.note.GNU-stack)
  110. }
  111. .comment 0 : { *(.comment) }
  112. }