sam7x_rom.ld 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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 = 0x00204000, LENGTH = 0x0000C000
  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. } > CODE = 0
  28. . = ALIGN(4);
  29. .ctors :
  30. {
  31. PROVIDE(__ctors_start__ = .);
  32. KEEP(*(SORT(.ctors.*)))
  33. KEEP(*(.ctors))
  34. PROVIDE(__ctors_end__ = .);
  35. } > CODE
  36. .dtors :
  37. {
  38. PROVIDE(__dtors_start__ = .);
  39. KEEP(*(SORT(.dtors.*)))
  40. KEEP(*(.dtors))
  41. PROVIDE(__dtors_end__ = .);
  42. } > CODE
  43. /* .ARM.exidx is sorted, so has to go in its own output section. */
  44. __exidx_start = .;
  45. .ARM.exidx :
  46. {
  47. *(.ARM.exidx* .gnu.linkonce.armexidx.*)
  48. /* This is used by the startup in order to initialize the .data secion */
  49. _sidata = .;
  50. } > CODE
  51. __exidx_end = .;
  52. /* .data section which is used for initialized data */
  53. .data : AT (_sidata)
  54. {
  55. . = ALIGN(4);
  56. /* This is used by the startup in order to initialize the .data secion */
  57. _sdata = . ;
  58. *(.data)
  59. *(.data.*)
  60. *(.gnu.linkonce.d*)
  61. . = ALIGN(4);
  62. /* This is used by the startup in order to initialize the .data secion */
  63. _edata = . ;
  64. } >DATA
  65. __data_end = .;
  66. .noinit :
  67. {
  68. *(.bss.noinit)
  69. } > DATA
  70. __bss_start = .;
  71. .bss :
  72. {
  73. . = ALIGN(4);
  74. /* This is used by the startup in order to initialize the .bss secion */
  75. _sbss = .;
  76. *(.bss)
  77. *(COMMON)
  78. . = ALIGN(4);
  79. /* This is used by the startup in order to initialize the .bss secion */
  80. _ebss = . ;
  81. _estack = .;
  82. } > DATA
  83. __bss_end = .;
  84. _end = .;
  85. }