This is an archive of the discontinued LLVM Phabricator instance.

[lld][WebAssembly] Fix for TLS + --relocatable
ClosedPublic

Authored by sbc100 on Dec 18 2020, 10:03 AM.

Details

Summary

When running in -r/--relocatable we output relocations but the
new TLS relocations type was missing from ObjFile::calcNewAddend
causing this combination of inputs/flags to crash the linker.

Also avoid creating tls variables in relocatable mode. These variables
are only needed when linking final executables.

Fixes: https://github.com/emscripten-core/emscripten/issues/12934
Fixes: PR48506

Diff Detail

Event Timeline

sbc100 created this revision.Dec 18 2020, 10:03 AM
sbc100 requested review of this revision.Dec 18 2020, 10:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 18 2020, 10:03 AM
tlively accepted this revision.Dec 21 2020, 9:14 AM

It would be good to add a description of the bug to the commit description.

This revision is now accepted and ready to land.Dec 21 2020, 9:14 AM
sbc100 edited the summary of this revision. (Show Details)Jan 13 2021, 7:46 AM
This revision was landed with ongoing or failed builds.Jan 13 2021, 7:51 AM
This revision was automatically updated to reflect the committed changes.