This is an archive of the discontinued LLVM Phabricator instance.

[lld][WebAssembly] Allow relocations against non-live global symbols
ClosedPublic

Authored by sbc100 on Apr 27 2021, 1:48 PM.

Details

Summary

Just like the in case for function and data symbols this is needed to
support relocations in debug info sections which are allowed contains
relocations against non-live symbols.

The motivating use case is an object file that contains debug info that
references __stack_pointer (a local symbol) but does not actually
contain any uses of __stack_pointer.

Fixes: https://github.com/emscripten-core/emscripten/issues/14025

Diff Detail

Event Timeline

sbc100 created this revision.Apr 27 2021, 1:48 PM
sbc100 requested review of this revision.Apr 27 2021, 1:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2021, 1:48 PM

Sadly I don't have test for this yet...

dschuff accepted this revision.Apr 27 2021, 4:41 PM
This revision is now accepted and ready to land.Apr 27 2021, 4:41 PM
sbc100 updated this revision to Diff 341258.Apr 28 2021, 10:29 AM

Added test

This revision was landed with ongoing or failed builds.Apr 28 2021, 10:30 AM
This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.Apr 28 2021, 10:32 AM
lld/test/wasm/globals.s
1

due to this change, i suppose

Sorry, landing fix now.