link.ld 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
  2. OUTPUT_ARCH(arm)
  3. ENTRY(_start)
  4. SECTIONS
  5. {
  6. . =0xA0000000;
  7. . = ALIGN(4);
  8. __text_start = .;
  9. .text :
  10. {
  11. *(.init)
  12. *(.text)
  13. *(.gnu.linkonce.t*)
  14. /* section information for finsh shell */
  15. . = ALIGN(4);
  16. __fsymtab_start = .;
  17. KEEP(*(FSymTab))
  18. __fsymtab_end = .;
  19. . = ALIGN(4);
  20. __vsymtab_start = .;
  21. KEEP(*(VSymTab))
  22. __vsymtab_end = .;
  23. . = ALIGN(4);
  24. . = ALIGN(4);
  25. __rt_init_start = .;
  26. KEEP(*(SORT(.rti_fn*)))
  27. __rt_init_end = .;
  28. . = ALIGN(4);
  29. /* section information for modules */
  30. . = ALIGN(4);
  31. __rtmsymtab_start = .;
  32. KEEP(*(RTMSymTab))
  33. __rtmsymtab_end = .;
  34. }
  35. __text_end = .;
  36. . = ALIGN(4);
  37. __rodata_start = .;
  38. .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) *(.eh_frame) }
  39. __rodata_end = .;
  40. . = ALIGN(4);
  41. .ctors :
  42. {
  43. PROVIDE(__ctors_start__ = .);
  44. KEEP(*(SORT(.ctors.*)))
  45. KEEP(*(.ctors))
  46. PROVIDE(__ctors_end__ = .);
  47. }
  48. .dtors :
  49. {
  50. PROVIDE(__dtors_start__ = .);
  51. KEEP(*(SORT(.dtors.*)))
  52. KEEP(*(.dtors))
  53. PROVIDE(__dtors_end__ = .);
  54. }
  55. . = ALIGN(4);
  56. __data_start = .;
  57. .data :
  58. {
  59. *(.data)
  60. *(.data.*)
  61. *(.gnu.linkonce.d*)
  62. }
  63. __data_end = .;
  64. . = ALIGN(4);
  65. .nobss : { *(.nobss) }
  66. . = ALIGN(4);
  67. __bss_start = .;
  68. .bss : { *(.bss) }
  69. __bss_end = .;
  70. /* stabs debugging sections. */
  71. .stab 0 : { *(.stab) }
  72. .stabstr 0 : { *(.stabstr) }
  73. .stab.excl 0 : { *(.stab.excl) }
  74. .stab.exclstr 0 : { *(.stab.exclstr) }
  75. .stab.index 0 : { *(.stab.index) }
  76. .stab.indexstr 0 : { *(.stab.indexstr) }
  77. .comment 0 : { *(.comment) }
  78. .debug_abbrev 0 : { *(.debug_abbrev) }
  79. .debug_info 0 : { *(.debug_info) }
  80. .debug_line 0 : { *(.debug_line) }
  81. .debug_pubnames 0 : { *(.debug_pubnames) }
  82. .debug_aranges 0 : { *(.debug_aranges) }
  83. _end = .;
  84. }