Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arch: arm: cortex_m: Consolidate bss/noinit sections for kernel/user mode #83721

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gramsay0
Copy link
Contributor

@gramsay0 gramsay0 commented Jan 9, 2025

Userspace originally required bss to precede kobject_data, as kobject_data size was not known until the final linking stage (#21747).

#33687 reserved space for kobject_data, allowing bss to now be after kobject_data.

Placing bss/noinit at the end of the linker script reduces the size of a "zephyr.bin" file, as the NOLOAD sections can be excluded. It also keeps the code common between kernel/user mode


@tejlmand as discussed here: #74042 (comment)

…mode

Userspace originally required bss to precede kobject_data, as
kobject_data size was not known until the final linking stage (zephyrproject-rtos#21747).

zephyrproject-rtos#33687 reserved space for kobject_data, allowing bss to now be after
kobject_data.

Placing bss/noinit at the end of the linker script reduces the size
of a "zephyr.bin" file, as the NOLOAD sections can be excluded. It
also keeps the code common between kernel/user mode

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Architectures area: ARM ARM (32-bit) Architecture
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants