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

arm-v8 a/r: linker: move data section between rodata and bss #79502

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Dat-NguyenDuy
Copy link
Contributor

This PR helps to reduces size of zephyr.bin on non-XIP by moving data section between rodata and bss.
Also move to use proper macro helpers when declaring no-init section.

By moving data section between rodata and bss, and disabling
Kconfig LINKER_LAST_SECTION_ID by default if non-XIP (it is
seems only needed for XIP), the size of zephyr.bin can be
reduced significantly on non-XIP system.

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
…ions

If a section is marked as noload, it will not be loaded
into memory by the program loader. So move to use:

- SECTION_PROLOGUE: because SECTION_DATA_PROLOGUE has
  ALIGN_WITH_INPUT attribute (on XIP) which seems is
  not needed for this sections

- GROUP_NOLOAD_LINK_IN: as it's supposed to be used for
  this sections. The ROM region will be consumed if using
  GROUP_DATA_LINK_IN and LMA != VMA

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants