This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] MC: Ensure that FUNCTION_OFFSET relocations are always against function symbols.
ClosedPublic

Authored by sbc100 on May 16 2018, 11:51 AM.

Details

Summary

The getAtom() method wasn't doing what we needed in all cases. We want the symbols
for the function which defines that section. We can compute this easily enough and we
know that we have at most one function in each section.

Once this lands I will revert rL331412 which is no longer needed.

Fixes PR37409

Diff Detail

Repository
rL LLVM

Event Timeline

sbc100 created this revision.May 16 2018, 11:51 AM
sbc100 edited the summary of this revision. (Show Details)May 16 2018, 12:06 PM
sbc100 edited the summary of this revision. (Show Details)
sbc100 edited the summary of this revision. (Show Details)May 16 2018, 12:10 PM
sbc100 added a reviewer: yurydelendik.
yurydelendik accepted this revision.May 16 2018, 1:09 PM

looks good

This revision is now accepted and ready to land.May 16 2018, 1:09 PM
This revision was automatically updated to reflect the committed changes.
keith.walker.arm added inline comments.
llvm/trunk/lib/MC/WasmObjectWriter.cpp
228

What is a fintining function?

sbc100 added inline comments.May 17 2018, 10:19 AM
llvm/trunk/lib/MC/WasmObjectWriter.cpp
228

That is a great question! See rL332632