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

Add missing -fPIC to dylink test #12220

Merged
merged 1 commit into from
Sep 15, 2020
Merged

Add missing -fPIC to dylink test #12220

merged 1 commit into from
Sep 15, 2020

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Sep 15, 2020

This should always have been here but was previously not a
fatal problem because the code in these object files happens
to not generate any non-PIC-compatible relocations.

However, since https://reviews.llvm.org/D87537 landed in llvm
all -pie/-shared linked binaries now require the mutable-globals
feature in at least one object otherwise the link will fail with

wasm-ld: error: mutable global imported but 'mutable-globals' feature not present in inputs: '__stack_pointer'. Use --no-check-features to suppress.

Passing -fPIC when compiling shared library code not only
produces compatible relocations but now also injects this feature
into the features section.

This was no a problem previously because the code in these
object files didn't generate any non-PIC-compatible relocations.
However, since https://reviews.llvm.org/D87537 landed in llvm
all `-pie/-shared` linked binaries now require the mutable-globals
feature in at least one object otherwise the link will fail with

`wasm-ld: error: mutable global imported but 'mutable-globals' feature
not present in inputs: '__stack_pointer'. Use --no-check-features to
suppress.`

Passing `-fPIC` when compiling shared library code not only
produces compatible relocations but now also injects this feature
into the features section.
@sbc100 sbc100 requested a review from tlively September 15, 2020 15:11
@sbc100 sbc100 merged commit d82172c into master Sep 15, 2020
@sbc100 sbc100 deleted the add_missing_pic branch September 15, 2020 16:39
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