elf_arm_efi.lds 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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 = .;
  38. *(SORT_BY_NAME(.init_array))
  39. _init_array_end = .;
  40. __CTOR_LIST__ = .;
  41. *(SORT_BY_NAME(.ctors))
  42. __CTOR_END__ = .;
  43. __DTOR_LIST__ = .;
  44. *(SORT_BY_NAME(.dtors))
  45. __DTOR_END__ = .;
  46. _fini_array = .;
  47. *(SORT_BY_NAME(.fini_array))
  48. _fini_array_end = .;
  49. /* the EFI loader doesn't seem to like a .bss section, so we stick
  50. it all into .data: */
  51. . = ALIGN(16);
  52. _bss = .;
  53. *(.sbss)
  54. *(.scommon)
  55. *(.dynbss)
  56. *(.bss)
  57. *(.bss.*)
  58. *(COMMON)
  59. . = ALIGN(16);
  60. _bss_end = .;
  61. }
  62. . = ALIGN(4096);
  63. .rel :
  64. {
  65. *(.rel.text*)
  66. *(.rel.data*)
  67. *(.rel.got)
  68. *(.rel.dyn)
  69. *(.rel.stab)
  70. }
  71. . = ALIGN(4096);
  72. .rel.plt : { *(.rel.plt) }
  73. _edata = .;
  74. _data_size = . - _etext;
  75. . = ALIGN(4096);
  76. .dynsym : { *(.dynsym) }
  77. . = ALIGN(4096);
  78. .dynstr : { *(.dynstr) }
  79. . = ALIGN(4096);
  80. .note.gnu.build-id : { *(.note.gnu.build-id) }
  81. /DISCARD/ :
  82. {
  83. *(.rel.reloc)
  84. *(.eh_frame)
  85. *(.note.GNU-stack)
  86. }
  87. .comment 0 : { *(.comment) }
  88. }