This is an archive of the discontinued LLVM Phabricator instance.

[lld][WebAssembly] Fix malformed output with -pie + --shared-memory
ClosedPublic

Authored by sbc100 on Dec 2 2020, 3:59 PM.

Details

Summary

The conditional guarding createInitMemoryFunction was incorrect and
didn't match that guarding the creation of the associated symbol.

Rather that reproduce the same conditions in multiple places we can
simply use the presence of the associated symbol.

Also, add an assertion that would have caught this bug.

Also, add a new test for this flag combination.

Diff Detail

Event Timeline

sbc100 created this revision.Dec 2 2020, 3:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 2 2020, 3:59 PM
sbc100 requested review of this revision.Dec 2 2020, 3:59 PM
sbc100 edited the summary of this revision. (Show Details)
sbc100 updated this revision to Diff 309090.Dec 2 2020, 4:01 PM
  • remove some debugging
tlively accepted this revision.Dec 3 2020, 10:33 AM
This revision is now accepted and ready to land.Dec 3 2020, 10:33 AM