Skip to content

feat: add GNU ld-compatible /DISCARD/ support#1866

Open
PritamP20 wants to merge 2 commits intowild-linker:mainfrom
PritamP20:feat/linker-script-discard
Open

feat: add GNU ld-compatible /DISCARD/ support#1866
PritamP20 wants to merge 2 commits intowild-linker:mainfrom
PritamP20:feat/linker-script-discard

Conversation

@PritamP20
Copy link
Copy Markdown
Contributor

added support for the /DISCARD/ pseudo-section in Wild linker scripts, similar to how GNU ld handles it , we now recognize /DISCARD/ blocks, turn their patterns into discard rules, and make sure any matching sections are intentionally removed instead of being treated as errors in the layout

this helps bring Wild in line with real-world linker scripts where /DISCARD/ is commonly used to strip out debug info or other unnecessary sections.

I also updated the symbol handling so that anything coming from discarded sections isn’t emitted or exported. This avoids some failures while keeping the behavior unchanged for normal sections.

fixiing: #1829

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.

1 participant