preLinkCmds 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. /* memory-config builder in ACoreIDE by qxbin*/
  2. /*21 Mar 2025 10:47:48 GMT*/
  3. ENTRY(_start)
  4. SECTIONS {
  5. _vectors_start = . ;
  6. .vector BLOCK(0x00001000) :
  7. {
  8. *(.vectors);
  9. . = ALIGN(4096);
  10. ;
  11. }
  12. _vectors_end = . ;
  13. _vectors_size = SIZEOF(.vector);
  14. _rom_vectors_start = . ;
  15. _rom_vectors_end = . ;
  16. _code_start = . ;
  17. .text BLOCK(0x00001000) :
  18. {
  19. CREATE_OBJECT_SYMBOLS *( .text ) ;
  20. *(.m_hdr) ;
  21. __EH_FRAME_BEGIN__ = .;
  22. *(.eh_frame) ;
  23. *(.gnu.linkonce.t*) ;
  24. . = ALIGN(4);
  25. ___CTOR_LIST__ = .;
  26. __CTOR_LIST__ = .;
  27. LONG (-1);
  28. *(.ctors);
  29. *(.ctor);
  30. LONG (0);
  31. __CTOR_END__ = .;
  32. ___DTOR_LIST__ = .;
  33. __DTOR_LIST__ = .;
  34. LONG (-1);
  35. *(.dtors);
  36. *(.dtor);
  37. LONG (0);
  38. __DTOR_END__ = .;
  39. *(.gnu.linkonce.r*);
  40. *(.glue_7) ;
  41. *(.glue_7t);
  42. *(.rodata);
  43. *(.rodata.*);
  44. *(.init);
  45. *(.jcr);
  46. *(.data.rel.local);
  47. *(.fini);
  48. *(.got*);
  49. *(.fixup);
  50. *(.interface);
  51. . = ALIGN(4096);
  52. ;
  53. }
  54. _code_end = . ;
  55. _code_size = SIZEOF(.text);
  56. _rom_code_start = . ;
  57. _rom_code_end = . ;
  58. _data_start = . ;
  59. .data BLOCK(0x00001000) :
  60. {
  61. *(.data);
  62. *(.gnu.linkonce.d*);
  63. *(.sdata*);
  64. *(.flash*);
  65. *(.gcc_except_table);
  66. *(.init_array*);
  67. *(.fini_array*);
  68. . = ALIGN(4);
  69. shell_cmd_start = .;
  70. *(.data.shellCmd) ;
  71. shell_cmd_end = .;
  72. . = ALIGN(4096);
  73. ;
  74. }
  75. _data_end = . ;
  76. _data_size = SIZEOF(.data);
  77. _rom_data_start = . ;
  78. _rom_data_end = . ;
  79. _exidx_start = . ;
  80. .exidx BLOCK(0x00001000) :
  81. {
  82. *(.ARM.exidx* .gnu.linkonce.armexidx.*);
  83. }
  84. _exidx_end = . ;
  85. _exidx_size = SIZEOF(.exidx);
  86. _rom_exidx_start = . ;
  87. _rom_exidx_end = . ;
  88. _bss_start = . ;
  89. .bss BLOCK(0x00001000) :
  90. {
  91. *(.bss);
  92. *(COMMON);
  93. *(.sbss);
  94. . = ALIGN(4096);
  95. ;
  96. }
  97. _bss_end = . ;
  98. _bss_size = SIZEOF(.bss);
  99. _pgheap_start = . ;
  100. pgheap BLOCK(0x00000004) :
  101. {
  102. }
  103. _pgheap_end = . ;
  104. _pgheap_size = SIZEOF(pgheap);
  105. _crtl_heap_start = . ;
  106. HEAP BLOCK(0x00000004) :
  107. {
  108. }
  109. _crtl_heap_end = . ;
  110. _crtl_heap_size = SIZEOF(HEAP);
  111. _start_start = . ;
  112. .start BLOCK(0x00001000) :
  113. {
  114. *(.start);
  115. . = ALIGN(4096);
  116. ;
  117. }
  118. _start_start = . ;
  119. _start_size = SIZEOF(.start);
  120. _rom_start_start = . ;
  121. _rom_start_end = . ;
  122. }
  123. load__code_start =( 0x00001000-1 )&~(0x00001000 -1 );
  124. load__data_start =( load__code_start + _code_size + ( 0x00001000 -1 ))&~(0x00001000 -1 );
  125. load__bss_start =( load__data_start + _data_size + ( 0x00001000 -1 ))&~(0x00001000 -1 );