Skip to content

fix: do not retain a linker script output section if a symbol is defined after it - #2243

Merged
lapla-cogito merged 5 commits into
wild-linker:mainfrom
vishruth-thimmaiah:fix_defsym_shndx
Jul 22, 2026
Merged

lapla-cogito merged 5 commits into
wild-linker:mainfrom
vishruth-thimmaiah:fix_defsym_shndx

Conversation

@vishruth-thimmaiah

Copy link
Copy Markdown
Member

When defining a symbol between two output sections in a linker script, the symbol should reference any preceding section before it, that is retained. An empty section that would otherwise get discarded shouldn't be retained.

Signed-off-by: Vishruth Thimmaiah <vishruththimmaiah@gmail.com>
…ned after it

Signed-off-by: Vishruth Thimmaiah <vishruththimmaiah@gmail.com>
Signed-off-by: Vishruth Thimmaiah <vishruththimmaiah@gmail.com>
Comment thread libwild/src/elf_writer.rs Outdated
vishruth-thimmaiah and others added 2 commits July 22, 2026 12:23
Co-authored-by: lapla <me@lapla.dev>
Signed-off-by: Vishruth Thimmaiah <vishruththimmaiah@gmail.com>

@lapla-cogito lapla-cogito left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, thanks!

@lapla-cogito
lapla-cogito merged commit 62fc318 into wild-linker:main Jul 22, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants