sam7x_rom.ld 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
  2. OUTPUT_ARCH(arm)
  3. MEMORY
  4. {
  5. CODE (rx) : ORIGIN = 0x00100000, LENGTH = 0x00040000
  6. /* DATA (rw) : ORIGIN = 0x00200000, LENGTH = 0x00010000 */
  7. DATA (rw) : ORIGIN = 0x00203000, LENGTH = 0x0000D000
  8. }
  9. ENTRY(_start)
  10. SECTIONS
  11. {
  12. .text :
  13. {
  14. *(.init)
  15. *(.text)
  16. *(.rodata)
  17. /* section information for finsh shell */
  18. . = ALIGN(4);
  19. __fsymtab_start = .;
  20. KEEP(*(FSymTab))
  21. __fsymtab_end = .;
  22. . = ALIGN(4);
  23. __vsymtab_start = .;
  24. KEEP(*(VSymTab))
  25. __vsymtab_end = .;
  26. . = ALIGN(4);
  27. . = ALIGN(4);
  28. __rt_init_start = .;
  29. KEEP(*(SORT(.rti_fn*)))
  30. __rt_init_end = .;
  31. . = ALIGN(4);
  32. } > CODE = 0
  33. . = ALIGN(4);
  34. .ctors :
  35. {
  36. PROVIDE(__ctors_start__ = .);
  37. KEEP(*(SORT(.ctors.*)))
  38. KEEP(*(.ctors))
  39. PROVIDE(__ctors_end__ = .);
  40. } > CODE
  41. .dtors :
  42. {
  43. PROVIDE(__dtors_start__ = .);
  44. KEEP(*(SORT(.dtors.*)))
  45. KEEP(*(.dtors))
  46. PROVIDE(__dtors_end__ = .);
  47. } > CODE
  48. /* .ARM.exidx is sorted, so has to go in its own output section. */
  49. __exidx_start = .;
  50. .ARM.exidx :
  51. {
  52. *(.ARM.exidx* .gnu.linkonce.armexidx.*)
  53. /* This is used by the startup in order to initialize the .data secion */
  54. _sidata = .;
  55. } > CODE
  56. __exidx_end = .;
  57. /* .data section which is used for initialized data */
  58. .data : AT (_sidata)
  59. {
  60. . = ALIGN(4);
  61. /* This is used by the startup in order to initialize the .data secion */
  62. _sdata = . ;
  63. *(.data)
  64. *(.data.*)
  65. *(.gnu.linkonce.d*)
  66. . = ALIGN(4);
  67. /* This is used by the startup in order to initialize the .data secion */
  68. _edata = . ;
  69. } >DATA
  70. __data_end = .;
  71. .noinit :
  72. {
  73. *(.bss.noinit)
  74. } > DATA
  75. __bss_start = .;
  76. .bss :
  77. {
  78. . = ALIGN(4);
  79. /* This is used by the startup in order to initialize the .bss secion */
  80. _sbss = .;
  81. *(.bss)
  82. *(COMMON)
  83. . = ALIGN(4);
  84. /* This is used by the startup in order to initialize the .bss secion */
  85. _ebss = . ;
  86. _estack = .;
  87. } > DATA
  88. __bss_end = .;
  89. _end = .;
  90. }