Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arch/sim: add custom data section support
The link script of NuttX Simulator is generated through compilation options. This PR will support configure special data sections in kconfig to meet the support of 3rd party applications. we need to follow the syntax of linker script. In 3rd-party applications, some data will be labeled as section: | a.c: | struct task_s a __attribute__((section(".data.custom.taska"))); | b.c: | struct task_s b __attribute__((section(".data.custom.taskb"))); Data of the same type struct can be placed in a fixed location to reduce the overhead caused by searching: | .data : | { | _custom_data_table_start = .; | KEEP(*(.data.custom.*)) | _custom_data_table_end = .; | } Such section declare can be configured via Kconfig in the PR: | CONFIG_SIM_CUSTOM_DATA_SECTION=" .data : { _custom_data_table_start = .; KEEP(*(.data.custom.*)) _custom_data_table_end = .; } " Signed-off-by: chao an <[email protected]>
- Loading branch information