elf_arm_efi.lds 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
  2. OUTPUT_ARCH(arm)
  3. ENTRY(_start)
  4. SECTIONS
  5. {
  6. .text 0 : {
  7. *(.text.head)
  8. _text = .;
  9. *(.text)
  10. *(.text.*)
  11. *(.gnu.linkonce.t.*)
  12. *(.plt)
  13. . = ALIGN(16);
  14. _evtext = .;
  15. . = ALIGN(4096);
  16. _etext = .;
  17. } =0
  18. _text_vsize = _evtext - _text;
  19. _text_size = _etext - _text;
  20. . = ALIGN(4096);
  21. _reloc = .;
  22. .areloc : {
  23. *(.areloc)
  24. _evreloc = .;
  25. . = ALIGN(4096);
  26. _ereloc = .;
  27. } =0
  28. _reloc_vsize = _evreloc - _reloc;
  29. _reloc_size = _ereloc - _reloc;
  30. . = ALIGN(65536);
  31. _data = .;
  32. .dynamic : { *(.dynamic) }
  33. . = ALIGN(4096);
  34. .data :
  35. {
  36. *(.sdata)
  37. *(.data)
  38. *(.data1)
  39. *(.data.*)
  40. *(.got.plt)
  41. *(.got)
  42. /*
  43. * Note that these aren't the using the GNU "CONSTRUCTOR" output section
  44. * command, so they don't start with a size. Because of p2align and the
  45. * end/END definitions, and the fact that they're mergeable, they can also
  46. * have NULLs which aren't guaranteed to be at the end.
  47. */
  48. . = ALIGN(16);
  49. __init_array_start = .;
  50. *(SORT(.init_array.*))
  51. *(.init_array)
  52. __init_array_end = .;
  53. . = ALIGN(16);
  54. __CTOR_LIST__ = .;
  55. *(SORT(.ctors.*))
  56. *(.ctors)
  57. __CTOR_END__ = .;
  58. . = ALIGN(16);
  59. __DTOR_LIST__ = .;
  60. *(SORT(.dtors.*))
  61. *(.dtors)
  62. __DTOR_END__ = .;
  63. . = ALIGN(16);
  64. __fini_array_start = .;
  65. *(SORT(.fini_array.*))
  66. *(.fini_array)
  67. __fini_array_end = .;
  68. /* the EFI loader doesn't seem to like a .bss section, so we stick
  69. it all into .data: */
  70. . = ALIGN(16);
  71. _bss = .;
  72. *(.sbss)
  73. *(.scommon)
  74. *(.dynbss)
  75. *(.bss)
  76. *(.bss.*)
  77. *(COMMON)
  78. . = ALIGN(16);
  79. _bss_end = .;
  80. _evdata = .;
  81. . = ALIGN(4096);
  82. _edata = .;
  83. } =0
  84. _data_vsize = _evdata - _data;
  85. _data_size = _edata - _data;
  86. . = ALIGN(4096);
  87. _rodata = .;
  88. .rel :
  89. {
  90. *(.rel.text*)
  91. *(.rel.data*)
  92. *(.rel.got)
  93. *(.rel.dyn)
  94. *(.rel.stab)
  95. *(.rel.init_array*)
  96. *(.rel.fini_array*)
  97. *(.rel.ctors*)
  98. *(.rel.dtors*)
  99. }
  100. . = ALIGN(4096);
  101. .rel.plt : { *(.rel.plt) }
  102. . = ALIGN(4096);
  103. .rodata : {
  104. *(.rodata*)
  105. _evrodata = .;
  106. . = ALIGN(4096);
  107. _erodata = .;
  108. } =0
  109. _rodata_vsize = _evrodata - _rodata;
  110. _rodata_size = _erodata - _rodata;
  111. _image_end = .;
  112. _alldata_size = _image_end - _reloc;
  113. . = ALIGN(4096);
  114. .dynsym : { *(.dynsym) }
  115. . = ALIGN(4096);
  116. .dynstr : { *(.dynstr) }
  117. . = ALIGN(4096);
  118. .note.gnu.build-id : { *(.note.gnu.build-id) }
  119. . = ALIGN(4096);
  120. .hash : { *(.hash) }
  121. . = ALIGN(4096);
  122. .gnu.hash : { *(.gnu.hash) }
  123. . = ALIGN(4096);
  124. .ARM.exidx : { *(.ARM.exidx*) }
  125. .ARM.extab : { *(.ARM.extab*) }
  126. /DISCARD/ :
  127. {
  128. *(.rel.areloc)
  129. *(.note.GNU-stack)
  130. }
  131. .comment 0 : { *(.comment) }
  132. }