linker.ld 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. /*
  2. * Copyright (c) 2013-2014 Wind River Systems, Inc.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. /**
  7. * @file
  8. * @brief Linker command/script file
  9. *
  10. * Linker script for the Cortex-M platforms.
  11. */
  12. #include <autoconf.h>
  13. #include <linker/sections.h>
  14. #include <devicetree.h>
  15. #include <linker/linker-defs.h>
  16. #include <linker/linker-tool.h>
  17. #ifdef CONFIG_SECTION_OVERLAY
  18. #include <section_overlay.h>
  19. #endif
  20. /* physical address of RAM */
  21. #define ROMABLE_REGION FLASH
  22. #define RAMABLE_REGION PSRAM
  23. #define ROM_ADDR (CONFIG_FLASH_BASE_ADDRESS + CONFIG_FLASH_LOAD_OFFSET)
  24. #define ROM_SIZE (CONFIG_FLASH_SIZE*1K - CONFIG_FLASH_LOAD_OFFSET)
  25. #define RAM_SIZE (CONFIG_SRAM_SIZE * 1K)
  26. #define RAM_ADDR CONFIG_SRAM_BASE_ADDRESS
  27. /* Set alignment to CONFIG_ARM_MPU_REGION_MIN_ALIGN_AND_SIZE
  28. * to make linker section alignment comply with MPU granularity.
  29. */
  30. #if defined(CONFIG_ARM_MPU_REGION_MIN_ALIGN_AND_SIZE)
  31. _region_min_align = CONFIG_ARM_MPU_REGION_MIN_ALIGN_AND_SIZE;
  32. #else
  33. /* If building without MPU support, use default 4-byte alignment. */
  34. _region_min_align = 4;
  35. #endif
  36. #define MPU_ALIGN(region_size) . = ALIGN(_region_min_align)
  37. MEMORY
  38. {
  39. FLASH (rx) : ORIGIN = ROM_ADDR, LENGTH = ROM_SIZE
  40. SRAM (wx) : ORIGIN = CONFIG_SRAM_BASE_ADDRESS, LENGTH = RAM_SIZE
  41. PSRAM (wx) : ORIGIN = CONFIG_PSRAM_BASE_ADDRESS, LENGTH = CONFIG_PSRAM_SIZE * 1K
  42. SHARE_RAM (wx) : ORIGIN = 0x2FF1AE00, LENGTH = 0x51FF
  43. DSP_SRAM (wx) : ORIGIN = 0x30044000, LENGTH = 0x14000
  44. /* Used by and documented in include/linker/intlist.ld */
  45. IDT_LIST (wx) : ORIGIN = (RAM_ADDR + RAM_SIZE), LENGTH = 2K
  46. }
  47. ENTRY(CONFIG_KERNEL_ENTRY)
  48. SECTIONS
  49. {
  50. #include <linker/rel-sections.ld>
  51. /*
  52. * .plt and .iplt are here according to 'arm-zephyr-elf-ld --verbose',
  53. * before text section.
  54. */
  55. /DISCARD/ :
  56. {
  57. *(.plt)
  58. }
  59. /DISCARD/ :
  60. {
  61. *(.iplt)
  62. }
  63. GROUP_START(ROMABLE_REGION)
  64. __rom_region_start = ROM_ADDR;
  65. SECTION_PROLOGUE(rom_start,,)
  66. {
  67. /* Located in generated directory. This file is populated by calling
  68. * zephyr_linker_sources(ROM_START ...). This typically contains the vector
  69. * table and debug information.
  70. */
  71. #include <snippets-rom-start.ld>
  72. } GROUP_LINK_IN(ROMABLE_REGION)
  73. SECTION_PROLOGUE(img_head,(ROM_ADDR+0x200),) AT (ROM_ADDR+0x200)
  74. {
  75. KEEP(*(.img_head*))
  76. } GROUP_LINK_IN(ROMABLE_REGION)
  77. SECTION_PROLOGUE(_ACTIONS_RODATA_SECTION_NAME,,)
  78. {
  79. . = ALIGN(4);
  80. __app_entry_table = .;
  81. KEEP(*(.app_entry))
  82. __app_entry_end = .;
  83. #ifdef CONFIG_AEM_WATCH_SUPPORT
  84. . = ALIGN(4);
  85. aem_init_begin = .;
  86. KEEP(*(SORT_BY_NAME(.aem_init*)))
  87. aem_init_end = .;
  88. . = ALIGN(4);
  89. aem_app_info_begin = .;
  90. KEEP(*(SORT_BY_NAME(.aem_app_info*)))
  91. aem_app_info_end = .;
  92. . = ALIGN(4);
  93. aem_app_activity_begin = .;
  94. KEEP(*(SORT_BY_NAME(.aem_app_activity*)))
  95. aem_app_activity_end = .;
  96. . = ALIGN(4);
  97. aem_pop_window_begin = .;
  98. KEEP(*(SORT_BY_NAME(.aem_pop_window*)))
  99. aem_pop_window_end = .;
  100. . = ALIGN(4);
  101. aem_aod_app_begin = .;
  102. KEEP(*(SORT_BY_NAME(.aem_aod_app*)))
  103. aem_aod_app_end = .;
  104. . = ALIGN(4);
  105. aem_proto_cmd_reg_begin = .;
  106. KEEP(*(SORT_BY_NAME(.aem_proto_cmd_reg*)))
  107. aem_proto_cmd_reg_end = .;
  108. . = ALIGN(4);
  109. aem_proto_ext_cmd_reg_begin = .;
  110. KEEP(*(SORT_BY_NAME(.aem_proto_ext_cmd_reg*)))
  111. aem_proto_ext_cmd_reg_end = .;
  112. . = ALIGN(4);
  113. aem_file_trans_reg_begin = .;
  114. KEEP(*(SORT_BY_NAME(.aem_file_trans_reg*)))
  115. aem_file_trans_reg_end = .;
  116. . = ALIGN(4);
  117. aem_watchface_db_begin = .;
  118. KEEP(*(.aem_watchface_db))
  119. aem_watchface_db_end = .;
  120. . = ALIGN(4);
  121. aem_app_list_db_begin = .;
  122. KEEP(*(.aem_app_list_db))
  123. aem_app_list_db_end = .;
  124. . = ALIGN(4);
  125. aem_quick_setting_db_begin = .;
  126. KEEP(*(.aem_quick_setting_db))
  127. aem_quick_setting_db_end = .;
  128. . = ALIGN(4);
  129. aem_launch_db_begin = .;
  130. KEEP(*(.aem_launch_db))
  131. aem_launch_db_end = .;
  132. #endif
  133. . = ALIGN(4);
  134. __service_entry_table = .;
  135. KEEP(*(.service_entry))
  136. __service_entry_end = .;
  137. . = ALIGN(4);
  138. __view_entry_table = .;
  139. KEEP(*(.view_entry))
  140. __view_entry_end = .;
  141. } GROUP_LINK_IN(ROMABLE_REGION)
  142. #ifdef CONFIG_SENSOR_ALGO
  143. #include <sensor_algo.ld>
  144. #endif
  145. SECTION_PROLOGUE(_TEXT_SECTION_NAME,,)
  146. {
  147. __text_region_start = .;
  148. #include <linker/kobject-text.ld>
  149. *(.text)
  150. *(".text.*")
  151. *(.gnu.linkonce.t.*)
  152. /*
  153. * These are here according to 'arm-zephyr-elf-ld --verbose',
  154. * after .gnu.linkonce.t.*
  155. */
  156. *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)
  157. } GROUP_LINK_IN(ROMABLE_REGION)
  158. __text_region_end = .;
  159. /*#if defined (CONFIG_CPLUSPLUS)*/
  160. SECTION_PROLOGUE(.ARM.extab,,)
  161. {
  162. /*
  163. * .ARM.extab section containing exception unwinding information.
  164. */
  165. *(.ARM.extab* .gnu.linkonce.armextab.*)
  166. } GROUP_LINK_IN(ROMABLE_REGION)
  167. /*#endif*/
  168. SECTION_PROLOGUE(.ARM.exidx,,)
  169. {
  170. /*
  171. * This section, related to stack and exception unwinding, is placed
  172. * explicitly to prevent it from being shared between multiple regions.
  173. * It must be defined for gcc to support 64-bit math and avoid
  174. * section overlap.
  175. */
  176. __start_unwind_idx = .;
  177. __exidx_start = .;
  178. #if defined (__GCC_LINKER_CMD__)
  179. *(.ARM.exidx* gnu.linkonce.armexidx.*)
  180. #endif
  181. __exidx_end = .;
  182. __stop_unwind_idx = .;
  183. } GROUP_LINK_IN(ROMABLE_REGION)
  184. __rodata_region_start = .;
  185. #include <linker/common-rom.ld>
  186. #include <linker/thread-local-storage.ld>
  187. SECTION_PROLOGUE(_RODATA_SECTION_NAME,,)
  188. {
  189. *(.rodata)
  190. *(".rodata.*")
  191. *(.gnu.linkonce.r.*)
  192. /* Located in generated directory. This file is populated by the
  193. * zephyr_linker_sources() Cmake function.
  194. */
  195. #include <snippets-rodata.ld>
  196. #ifdef CONFIG_SECTION_OVERLAY
  197. . = ALIGN(4);
  198. __overlay_table = .;
  199. LONG(OVERLAY_TABLE_MAGIC)
  200. /* overlay items count */
  201. LONG(7)
  202. /* for a1_wav_p.a */
  203. LONG(OVERLAY_ID_LIBAPWAV)
  204. LONG(0);
  205. LONG(0);
  206. LONG(0);
  207. LONG(ABSOLUTE(ADDR(.overlay.data.apwav)));
  208. LONG(SIZEOF(.overlay.data.apwav));
  209. LONG(LOADADDR(.overlay.data.apwav));
  210. LONG(ABSOLUTE(ADDR(.overlay.bss.apwav)));
  211. LONG(SIZEOF(.overlay.bss.apwav));
  212. /* for a1_mp3_p.a */
  213. LONG(OVERLAY_ID_LIBAPMP3)
  214. LONG(0);
  215. LONG(0);
  216. LONG(0);
  217. LONG(ABSOLUTE(ADDR(.overlay.data.apmp3)));
  218. LONG(SIZEOF(.overlay.data.apmp3));
  219. LONG(LOADADDR(.overlay.data.apmp3));
  220. LONG(ABSOLUTE(ADDR(.overlay.bss.apmp3)));
  221. LONG(SIZEOF(.overlay.bss.apmp3));
  222. /* for a1_ape_p.a */
  223. LONG(OVERLAY_ID_LIBAPAPE)
  224. LONG(0);
  225. LONG(0);
  226. LONG(0);
  227. LONG(ABSOLUTE(ADDR(.overlay.data.apape)));
  228. LONG(SIZEOF(.overlay.data.apape));
  229. LONG(LOADADDR(.overlay.data.apape));
  230. LONG(ABSOLUTE(ADDR(.overlay.bss.apape)));
  231. LONG(SIZEOF(.overlay.bss.apape));
  232. /* for a1_w13_p.a */
  233. LONG(OVERLAY_ID_LIBAPWMA)
  234. LONG(0);
  235. LONG(0);
  236. LONG(0);
  237. LONG(ABSOLUTE(ADDR(.overlay.data.apwma)));
  238. LONG(SIZEOF(.overlay.data.apwma));
  239. LONG(LOADADDR(.overlay.data.apwma));
  240. LONG(ABSOLUTE(ADDR(.overlay.bss.apwma)));
  241. LONG(SIZEOF(.overlay.bss.apwma));
  242. /* for a1_fla_p.a */
  243. LONG(OVERLAY_ID_LIBADFLA)
  244. LONG(0);
  245. LONG(0);
  246. LONG(0);
  247. LONG(ABSOLUTE(ADDR(.overlay.data.apfla)));
  248. LONG(SIZEOF(.overlay.data.apfla));
  249. LONG(LOADADDR(.overlay.data.apfla));
  250. LONG(ABSOLUTE(ADDR(.overlay.bss.apfla)));
  251. LONG(SIZEOF(.overlay.bss.apfla));
  252. /* for a1_a23_p.a */
  253. LONG(OVERLAY_ID_LIBAPAAC)
  254. LONG(0);
  255. LONG(0);
  256. LONG(0);
  257. LONG(ABSOLUTE(ADDR(.overlay.data.apaac)));
  258. LONG(SIZEOF(.overlay.data.apaac));
  259. LONG(LOADADDR(.overlay.data.apaac));
  260. LONG(ABSOLUTE(ADDR(.overlay.bss.apaac)));
  261. LONG(SIZEOF(.overlay.bss.apaac));
  262. . = ALIGN(4);
  263. #endif
  264. #include <linker/kobject-rom.ld>
  265. /*
  266. * For XIP images, in order to avoid the situation when __data_rom_start
  267. * is 32-bit aligned, but the actual data is placed right after rodata
  268. * section, which may not end exactly at 32-bit border, pad rodata
  269. * section, so __data_rom_start points at data and it is 32-bit aligned.
  270. *
  271. * On non-XIP images this may enlarge image size up to 3 bytes. This
  272. * generally is not an issue, since modern ROM and FLASH memory is
  273. * usually 4k aligned.
  274. */
  275. . = ALIGN(4);
  276. } GROUP_LINK_IN(ROMABLE_REGION)
  277. #include <linker/cplusplus-rom.ld>
  278. __rodata_region_end = .;
  279. MPU_ALIGN(__rodata_region_end -__rom_region_start);
  280. __rom_region_end = .;
  281. __rom_region_size = __rom_region_end - __rom_region_start;
  282. GROUP_END(ROMABLE_REGION)
  283. /*
  284. * These are here according to 'arm-zephyr-elf-ld --verbose',
  285. * before data section.
  286. */
  287. /DISCARD/ : {
  288. *(.got.plt)
  289. *(.igot.plt)
  290. *(.got)
  291. *(.igot)
  292. }
  293. . = RAM_ADDR;
  294. __ramdump_sram_start = .;
  295. /* Align the start of image SRAM with the
  296. * minimum granularity required by MPU.
  297. */
  298. . = ALIGN(_region_min_align);
  299. _image_ram_start = .;
  300. /* ================================= sram data =================================*/
  301. SECTION_DATA_PROLOGUE(_SRAM_CODE_SECTION_NAME,,)
  302. {
  303. . = ALIGN(4);
  304. _sram_data_start = .;
  305. _sram_func_start = .;
  306. *(.sleepfunc)
  307. *(".sleepfunc.*")
  308. *(.defunc)
  309. *(.lvglfunc)
  310. _sram_func_end = .;
  311. }GROUP_DATA_LINK_IN(SRAM, ROMABLE_REGION)
  312. _sram_func_ram_size = _sram_func_end - _sram_func_start;
  313. _sram_func_rom_start = LOADADDR(_SRAM_CODE_SECTION_NAME);
  314. SECTION_DATA_PROLOGUE(_SRAM_DATA_SECTION_NAME,,)
  315. {
  316. . = ALIGN(4);
  317. *(.sleep.data*)
  318. }GROUP_DATA_LINK_IN(SRAM, ROMABLE_REGION)
  319. _sram_data_end = .;
  320. _sram_data_ram_size = _sram_data_end - _sram_data_start;
  321. _sram_data_rom_start = LOADADDR(_SRAM_CODE_SECTION_NAME);
  322. /* ================================= psram data =================================*/
  323. OVERLAY : NOCROSSREFS
  324. {
  325. .overlay.data.apfla {
  326. *a1_fla_p.a:*(.data .data.*)
  327. }
  328. .overlay.data.apwma {
  329. *a1_w13_p.a:*(.data .data.*)
  330. }
  331. .overlay.data.apape {
  332. *a1_ape_p.a:*(.data .data.*)
  333. }
  334. .overlay.data.apmp3 {
  335. *a1_mp3_p.a:*(.data .data.*)
  336. }
  337. .overlay.data.apwav {
  338. *a1_wav_p.a:*(.data .data.*)
  339. }
  340. .overlay.data.apaac {
  341. *a1_a13_p.a:*(.data .data.*)
  342. }
  343. } GROUP_DATA_LINK_IN(PSRAM, ROMABLE_REGION)
  344. __ramdump_psram_start = ALIGN(4);
  345. /* Located in generated directory. This file is populated by the
  346. * zephyr_linker_sources() Cmake function.
  347. */
  348. #include <snippets-ram-sections.ld>
  349. SECTION_DATA_PROLOGUE(_DATA_SECTION_NAME,,)
  350. {
  351. __data_region_start = .;
  352. __data_start = .;
  353. *(.data)
  354. *(".data.*")
  355. *(".kernel.*")
  356. /* Located in generated directory. This file is populated by the
  357. * zephyr_linker_sources() Cmake function.
  358. */
  359. #include <snippets-rwdata.ld>
  360. __data_end = .;
  361. } GROUP_DATA_LINK_IN(PSRAM, ROMABLE_REGION)
  362. __data_size = __data_end - __data_start;
  363. __data_load_start = LOADADDR(_DATA_SECTION_NAME);
  364. __data_region_load_start = LOADADDR(_DATA_SECTION_NAME);
  365. #include <linker/common-ram.ld>
  366. #include <linker/kobject-data.ld>
  367. #include <linker/cplusplus-ram.ld>
  368. __data_region_end = .;
  369. /* ================================= sram bss =================================*/
  370. __sram_bss_start = .;
  371. SECTION_PROLOGUE(_SRAM_BSS_SECTION_NAME,(NOLOAD),)
  372. {
  373. } GROUP_LINK_IN(SRAM)
  374. __sram_bss_end = .;
  375. /* ================================= psram bss ================================= */
  376. OVERLAY : NOCROSSREFS
  377. {
  378. .overlay.bss.apfla {
  379. *a1_fla_p.a:*(.bss .bss.* .scommon COMMON)
  380. }
  381. .overlay.bss.apwma {
  382. *a1_w13_p.a:*(.bss .bss.* .scommon COMMON)
  383. }
  384. .overlay.bss.apape {
  385. *a1_ape_p.a:*(.bss .bss.* .scommon COMMON)
  386. }
  387. .overlay.bss.apmp3 {
  388. *a1_mp3_p.a:*(.bss .bss.* .scommon COMMON)
  389. }
  390. .overlay.bss.apwav {
  391. *a1_wav_p.a:*(.bss .bss.* .scommon COMMON)
  392. }
  393. .overlay.bss.apaac {
  394. *a1_a13_p.a:*(.bss .bss.* .scommon COMMON)
  395. }
  396. } GROUP_LINK_IN(PSRAM)
  397. __psram_bss_start = .;
  398. __bss_start = .;
  399. SECTION_PROLOGUE(_BSS_SECTION_NAME,(NOLOAD),)
  400. {
  401. /*
  402. * For performance, BSS section is assumed to be 4 byte aligned and
  403. * a multiple of 4 bytes
  404. */
  405. . = ALIGN(4);
  406. *(.bss)
  407. *(.bss.*)
  408. *(.scommon)
  409. *(COMMON)
  410. /*
  411. * As memory is cleared in words only, it is simpler to ensure the BSS
  412. * section ends on a 4 byte boundary. This wastes a maximum of 3 bytes.
  413. */
  414. } GROUP_LINK_IN(PSRAM)
  415. SECTION_PROLOGUE(_PSRAM_BSS_SECTION_NAME,(NOLOAD),)
  416. {
  417. /*
  418. * For performance, BSS section is assumed to be 4 byte aligned and
  419. * a multiple of 4 bytes
  420. */
  421. . = ALIGN(4);
  422. *(".kernel_bss.*")
  423. *(.bthost_bss*)
  424. *(.btsrv_bss*)
  425. } GROUP_LINK_IN(PSRAM)
  426. __bss_end = ALIGN(4);
  427. __psram_bss_end = ALIGN(4);
  428. /* ================================= sram noinit ================================= */
  429. SECTION_PROLOGUE(_SRAM_NOINIT_SECTION_NAME,(NOLOAD),)
  430. {
  431. . = ALIGN(512);
  432. __kernel_ram_start = .;
  433. *(.srm_irq_vector*)
  434. *(.interrupt.noinit.stack*)
  435. *(.main.noinit.stack*)
  436. *(.uisrv.noinit.stack*)
  437. *(.lvgl.noinit.gpu*)
  438. *(.spinand.bss.BLK_ARRAY*)
  439. *(.spinand.bss.PAGE_CACHE_BUF*)
  440. *(.system.bss.sdfs_cache*)
  441. *(.diskio.cache.pool*)
  442. *(.jpeg.bss.temp_buffer*)
  443. *(.ram.noinit*)
  444. *(.decompress.bss.cache*)
  445. *(.lvgl.noinit.vdb*)
  446. *(.ram.noinit.stack*)
  447. *(.audio.bss.ouput_pcm*)
  448. *(.audio.bss.input_pcm*)
  449. *(.act_s2_not_save_mem*)
  450. __kernel_ram_save_end = .;
  451. }GROUP_LINK_IN(SRAM)
  452. __ramdump_sram_end = ALIGN(4);
  453. SECTION_PROLOGUE(_SRAM_SLEEP_SHUTDOWN_SECTION_NAME,(NOLOAD),)
  454. {
  455. . = ALIGN(512);
  456. _sleep_shutdown_ram_start = .;
  457. *(.sram.noinit.sufacebuffer*)
  458. _sleep_shutdown_ram_end = .;
  459. }GROUP_LINK_IN(SRAM)
  460. #ifdef CONFIG_SIM_FLASH_ACTS
  461. SECTION_PROLOGUE(SIM_ACTLOG,(NOLOAD),)
  462. {
  463. . = ALIGN(4);
  464. __sim_flash_ram_start = .;
  465. *(.sram.noinit.actlog*)
  466. __sim_flash_ram_end = .;
  467. }GROUP_LINK_IN(SRAM)
  468. #endif
  469. /* ================================= psram noinit ================================= */
  470. SECTION_PROLOGUE(_NOINIT_SECTION_NAME,(NOLOAD),)
  471. {
  472. /*
  473. * This section is used for non-initialized objects that
  474. * will not be cleared during the boot process.
  475. */
  476. *(.noinit)
  477. *(".noinit.*")
  478. *(".kernel_noinit.*")
  479. /* Located in generated directory. This file is populated by the
  480. * zephyr_linker_sources() Cmake function.
  481. */
  482. #include <snippets-noinit.ld>
  483. #ifdef CONFIG_SOC_NOINIT_LD
  484. #include <soc-noinit.ld>
  485. #endif
  486. } GROUP_LINK_IN(PSRAM)
  487. SECTION_PROLOGUE(_PRAM_NOINIT_SECTION_NAME, (NOLOAD),SUBALIGN(64))
  488. {
  489. *(.lvgl.noinit.malloc*)
  490. *(.vglite.noinit.mem_pool*)
  491. *(.vglite.noinit.malloc*)
  492. #ifdef CONFIG_VIDEO_PLAYER
  493. *(.VIDEO_PSRAM_REGION*)
  494. #endif
  495. __ramdump_psram_end = ALIGN(4);
  496. *(.UI_PSRAM_REGION*)
  497. *(.RES_PSRAM_REGION*)
  498. *(.BMPFONT_PSRAM_REGION*)
  499. *(.font.bss.cache*)
  500. *(.tile.bss.cache*)
  501. #ifdef CONFIG_AEM_WATCH_SUPPORT
  502. *(.aem.noinit.cache*)
  503. #endif
  504. } GROUP_LINK_IN(PSRAM)
  505. /* Define linker symbols */
  506. _image_ram_end = .;
  507. __kernel_ram_end = RAM_ADDR + RAM_SIZE;
  508. __kernel_ram_size = __kernel_ram_end - __kernel_ram_start;
  509. SECTION_PROLOGUE(_ATT_RUNTIME_DATA_SECTION_NAME,(NOLOAD),)
  510. {
  511. /*
  512. * For att runtime data
  513. */
  514. . = ALIGN(4);
  515. KEEP(*(.attruntimedata*))
  516. }GROUP_LINK_IN(DSP_SRAM)
  517. /* ================================= share ram noinit ================================= */
  518. SECTION_DATA_PROLOGUE(_SHARE_RAM_BSS_SECTION_NAME, (NOLOAD),SUBALIGN(4))
  519. {
  520. __share_ram_start = .;
  521. *(.DSP_SHARE_RAM*)
  522. } GROUP_LINK_IN(SHARE_RAM)
  523. __share_ram_end = .;
  524. _end = .; /* end of image */
  525. /* Located in generated directory. This file is populated by the
  526. * zephyr_linker_sources() Cmake function.
  527. */
  528. #include <snippets-sections.ld>
  529. #include <linker/debug-sections.ld>
  530. /DISCARD/ : { *(.note.GNU-stack) }
  531. SECTION_PROLOGUE(.ARM.attributes, 0,)
  532. {
  533. KEEP(*(.ARM.attributes))
  534. KEEP(*(.gnu.attributes))
  535. }
  536. /* Must be last in romable region */
  537. SECTION_PROLOGUE(.last_section,(NOLOAD),)
  538. {
  539. } GROUP_LINK_IN(ROMABLE_REGION)
  540. /* To provide the image size as a const expression,
  541. * calculate this value here. */
  542. _flash_used = LOADADDR(.last_section) - __rom_region_start;
  543. }