Skip to content

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>
@wearyzen
Copy link
Contributor

wearyzen commented Feb 5, 2025

Could you please have a look at this comment. I think we might have introduced an issue with __kernel_ram_start already in #74042 but I am not sure what the impact is since there is no test failure.
@tejlmand could you please help have a look at this and the PR #79502 for this?

Copy link
Contributor

@tejlmand tejlmand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, although the comment and references by @wearyzen is correct, then the __kernel_ram_start issue and fix is orthogonal to this PR.

Copy link
Contributor

@wearyzen wearyzen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gramsay0, could you please confirm if you would be able to address the issue with __kernel_ram_start in a follow up PR?

@kartben kartben merged commit f9d69fc into zephyrproject-rtos:main Feb 6, 2025
30 checks passed
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.

6 participants