elf_ia32_fbsd_efi.lds 2.3 KB

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