elf_ia32_efi.lds 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
  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. . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
  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. /* the EFI loader doesn't seem to like a .bss section, so we stick
  44. it all into .data: */
  45. *(.sbss)
  46. *(.scommon)
  47. *(.dynbss)
  48. *(.bss)
  49. *(COMMON)
  50. }
  51. .note.gnu.build-id : { *(.note.gnu.build-id) }
  52. . = ALIGN(4096);
  53. .dynamic : { *(.dynamic) }
  54. . = ALIGN(4096);
  55. .rel :
  56. {
  57. *(.rel.data)
  58. *(.rel.data.*)
  59. *(.rel.got)
  60. *(.rel.stab)
  61. *(.data.rel.ro.local)
  62. *(.data.rel.local)
  63. *(.data.rel.ro)
  64. *(.data.rel*)
  65. }
  66. _edata = .;
  67. _data_size = . - _etext;
  68. . = ALIGN(4096);
  69. .reloc : /* This is the PECOFF .reloc section! */
  70. {
  71. *(.reloc)
  72. }
  73. . = ALIGN(4096);
  74. .dynsym : { *(.dynsym) }
  75. . = ALIGN(4096);
  76. .dynstr : { *(.dynstr) }
  77. . = ALIGN(4096);
  78. . = DATA_SEGMENT_END (.);
  79. /DISCARD/ :
  80. {
  81. *(.rel.reloc)
  82. *(.eh_frame)
  83. *(.note.GNU-stack)
  84. }
  85. .comment 0 : { *(.comment) }
  86. }