link.lds 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
  2. OUTPUT_ARCH(arm)
  3. ENTRY(_boot)
  4. SECTIONS
  5. {
  6. . = 0x80100000;
  7. .text :
  8. {
  9. *(.boot)
  10. . = ALIGN(64);
  11. *(.vectors)
  12. *(.text)
  13. *(.text.*)
  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. /* section information for modules */
  25. . = ALIGN(4);
  26. __rtmsymtab_start = .;
  27. KEEP(*(RTMSymTab))
  28. __rtmsymtab_end = .;
  29. /* section information for initialization */
  30. . = ALIGN(4);
  31. __rt_init_start = .;
  32. KEEP(*(SORT(.rti_fn*)))
  33. __rt_init_end = .;
  34. } =0
  35. __text_end = .;
  36. __rodata_start = .;
  37. .rodata : { *(.rodata) *(.rodata.*) }
  38. __rodata_end = .;
  39. . = ALIGN(4);
  40. .ctors :
  41. {
  42. PROVIDE(__ctors_start__ = .);
  43. /* new GCC version uses .init_array */
  44. KEEP(*(SORT(.init_array.*)))
  45. KEEP(*(.init_array))
  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(16 * 1024);
  56. .l1_page_table :
  57. {
  58. __l1_page_table_start = .;
  59. . += 16K;
  60. }
  61. . = ALIGN(8);
  62. __data_start = .;
  63. .data :
  64. {
  65. *(.data)
  66. *(.data.*)
  67. }
  68. __data_end = .;
  69. . = ALIGN(8);
  70. __bss_start = .;
  71. .bss :
  72. {
  73. *(.bss)
  74. *(.bss.*)
  75. *(COMMON)
  76. . = ALIGN(4);
  77. }
  78. . = ALIGN(4);
  79. __bss_end = .;
  80. .heap :
  81. {
  82. . = ALIGN(8);
  83. __end__ = .;
  84. PROVIDE(end = .);
  85. __HeapBase = .;
  86. . += 0x400;
  87. __HeapLimit = .;
  88. __heap_limit = .; /* Add for _sbrk */
  89. }
  90. /* Stabs debugging sections. */
  91. .stab 0 : { *(.stab) }
  92. .stabstr 0 : { *(.stabstr) }
  93. .stab.excl 0 : { *(.stab.excl) }
  94. .stab.exclstr 0 : { *(.stab.exclstr) }
  95. .stab.index 0 : { *(.stab.index) }
  96. .stab.indexstr 0 : { *(.stab.indexstr) }
  97. .comment 0 : { *(.comment) }
  98. _end = .;
  99. }