rm48x50.ld 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. /*
  2. * linker script for RM48x50 with GNU ld
  3. * Grissiom 2013-10-20
  4. */
  5. /* Program Entry, set to mark it as "used" and avoid gc */
  6. MEMORY
  7. {
  8. CODE (rx) : ORIGIN = 0x00000000, LENGTH = 3M
  9. DATA (rw) : ORIGIN = 0x08000000, LENGTH = 256k
  10. }
  11. OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
  12. OUTPUT_ARCH(arm)
  13. ENTRY(system_vectors)
  14. SECTIONS
  15. {
  16. .text :
  17. {
  18. __text_start = .;
  19. *(.vectors)
  20. *(.text)
  21. *(.text.*)
  22. __rodata_start = .;
  23. *(.rodata)
  24. *(.rodata.*)
  25. __rodata_end = .;
  26. *(.glue_7)
  27. *(.glue_7t)
  28. *(.vfp11_veneer)
  29. *(.v4_bx)
  30. *(.gnu.linkonce.t*)
  31. /* section information for finsh shell */
  32. . = ALIGN(4);
  33. __fsymtab_start = .;
  34. KEEP(*(FSymTab))
  35. __fsymtab_end = .;
  36. . = ALIGN(4);
  37. __vsymtab_start = .;
  38. KEEP(*(VSymTab))
  39. __vsymtab_end = .;
  40. . = ALIGN(4);
  41. /* section information for modules */
  42. . = ALIGN(4);
  43. __rtmsymtab_start = .;
  44. KEEP(*(RTMSymTab))
  45. __rtmsymtab_end = .;
  46. /* section information for initialization */
  47. . = ALIGN(4);
  48. __rt_init_start = .;
  49. KEEP(*(SORT(.rti_fn*)))
  50. __rt_init_end = .;
  51. __text_end = .;
  52. } > CODE = 0
  53. . = ALIGN(4);
  54. .ctors :
  55. {
  56. PROVIDE(__ctors_start__ = .);
  57. KEEP(*(SORT(.ctors.*)))
  58. KEEP(*(.ctors))
  59. PROVIDE(__ctors_end__ = .);
  60. } > CODE
  61. .dtors :
  62. {
  63. PROVIDE(__dtors_start__ = .);
  64. KEEP(*(SORT(.dtors.*)))
  65. KEEP(*(.dtors))
  66. PROVIDE(__dtors_end__ = .);
  67. /* This is used by the startup in order to initialize the .data secion */
  68. _sidata = .;
  69. } > CODE
  70. /* .ARM.exidx is sorted, so has to go in its own output section. */
  71. __exidx_start = .;
  72. .ARM.exidx :
  73. {
  74. *(.ARM.exidx* .gnu.linkonce.armexidx.*)
  75. /* This is used by the startup in order to initialize the .data secion */
  76. _sidata = .;
  77. } > CODE
  78. __exidx_end = .;
  79. /* .data section which is used for initialized data */
  80. .data : AT (_sidata)
  81. {
  82. . = ALIGN(4);
  83. /* This is used by the startup in order to initialize the .data secion */
  84. _sdata = . ;
  85. *(.data)
  86. *(.data.*)
  87. *(.gnu.linkonce.d*)
  88. . = ALIGN(4);
  89. /* This is used by the startup in order to initialize the .data secion */
  90. _edata = . ;
  91. } >DATA
  92. __data_end = .;
  93. __noinit_start = .;
  94. .noinit :
  95. {
  96. . = ALIGN(4);
  97. *(.bss.noinit)
  98. } > DATA
  99. __noinit_stop = .;
  100. __bss_start = .;
  101. .bss :
  102. {
  103. . = ALIGN(4);
  104. /* This is used by the startup in order to initialize the .bss secion */
  105. _sbss = .;
  106. *(.bss)
  107. *(.bss.*)
  108. *(COMMON)
  109. . = ALIGN(4);
  110. /* This is used by the startup in order to initialize the .bss secion */
  111. _ebss = . ;
  112. } > DATA
  113. __bss_end = .;
  114. /* Stabs debugging sections.
  115. .stab 0 : { *(.stab) }
  116. .stabstr 0 : { *(.stabstr) }
  117. .stab.excl 0 : { *(.stab.excl) }
  118. .stab.exclstr 0 : { *(.stab.exclstr) }
  119. .stab.index 0 : { *(.stab.index) }
  120. .stab.indexstr 0 : { *(.stab.indexstr) }
  121. .comment 0 : { *(.comment) }
  122. */
  123. _end = .;
  124. }