1# SPDX-License-Identifier: Apache-2.0 2# The contents of this file is based on include/zephyr/linker/kobject-rom.ld 3# Please keep in sync 4 5# During LINKER_KOBJECT_PREBUILT and LINKER_ZEPHYR_PREBUILT, 6# space needs to be reserved for the rodata that will be 7# produced by gperf during the final stages of linking. 8# The alignment and size are produced by 9# scripts/build/gen_kobject_placeholders.py. These are here 10# so the addresses to kobjects would remain the same 11# during the final stages of linking (LINKER_ZEPHYR_FINAL). 12 13if(CONFIG_USERSPACE) 14 # By the magic of MIN_SIZE the space will be there 15 zephyr_linker_section_configure(SECTION .rodata KEEP INPUT ".kobject_data.rodata*" 16 MIN_SIZE @KOBJECT_RODATA_SZ@ 17 ALIGN @KOBJECT_RODATA_ALIGN@ 18 PASS LINKER_ZEPHYR_PREBUILT LINKER_ZEPHYR_FINAL 19 ) 20endif() 21