You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
misc: Implement two-pass linking to separate rodata sections.
This patch changes the build to perform two-pass linking to separate rodata
with relocations (copied to RAM) from rodata with no relocations (pure data)
that can be kept in flash by llext.
For dynamic linking mode:
- First pass: Link with build-dynamic.ld to create temp ELF (unchanged).
- Analyze the elf and extract, sort and write out the sections:
- .rodata: sections WITH relocations → copied to RAM (LLEXT_MEM_RODATA)
- .rodata_noreloc: sections WITHOUT relocations → kept in flash (LLEXT_MEM_RODATA_NO_RELOC)
- Second pass: Link with generated rodata_split.ld + build-dynamic.ld.
For static linking mode:
- Generates empty rodata_split.ld (no section separation needed)
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
0 commit comments