This is an archive of the discontinued LLVM Phabricator instance.

[lld][WebAssembly] Fix crash on undefined/weak function symbols in LTO objects
ClosedPublic

Authored by sbc100 on May 27 2022, 8:41 AM.

Details

Summary

Symbols from LTO objects don't contain Wasm signatures, but we need a
signature when we create undefined/stub functions for missing weakly
undefined symbols.

Luckily, after LTO, we know that symbols that are not referenced by a
regular object file must not be needed in the final output so there
is no need to generate undefined/stub function for them.

Diff Detail

Event Timeline

sbc100 created this revision.May 27 2022, 8:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 27 2022, 8:41 AM
Herald added subscribers: pmatos, asb, wingo and 5 others. · View Herald Transcript
sbc100 requested review of this revision.May 27 2022, 8:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 27 2022, 8:41 AM

Still working on a test..

sbc100 updated this revision to Diff 432584.May 27 2022, 9:21 AM
  • add test
dschuff accepted this revision.May 27 2022, 11:02 AM
This revision is now accepted and ready to land.May 27 2022, 11:02 AM
This revision was landed with ongoing or failed builds.May 27 2022, 11:41 AM
This revision was automatically updated to reflect the committed changes.