elf_arm_efi.lds 2.0 KB

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