Skip to content

[5.7] 🍒 Stop using --gc-sections for Wasm target to protect metadata sections #5648

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

Conversation

kateinoigakukun
Copy link
Member

@kateinoigakukun kateinoigakukun commented Jul 10, 2022

Cherry-pick #5638 because it's a regression happening since in 5.7

CC: @MaxDesiatov

…ns (swiftlang#5638)

Now wasm-ld strips data segments referenced through __start/__stop symbols
during GC, and it removes Swift metadata sections like swift5_protocols
We should add support of SHF_GNU_RETAIN-like flag for __attribute__((retain))
to LLVM and wasm-ld. For now, just disable section GC for Wasm target.

Context:
llvm/llvm-project#55839
https://reviews.llvm.org/D126950#3558050
@kateinoigakukun
Copy link
Member Author

@swift-ci Please smoke test

@neonichu neonichu requested a review from airspeedswift July 11, 2022 21:17
@neonichu neonichu self-assigned this Jul 11, 2022
@tomerd tomerd added the 5.7 label Jul 12, 2022
@tomerd tomerd merged commit 93c2344 into swiftlang:release/5.7 Jul 12, 2022
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.

5 participants