OSDN Git Service

[WebAssembly] MC: Ensure that FUNCTION_OFFSET relocations are always against function...
authorSam Clegg <sbc@chromium.org>
Wed, 16 May 2018 20:09:05 +0000 (20:09 +0000)
committerSam Clegg <sbc@chromium.org>
Wed, 16 May 2018 20:09:05 +0000 (20:09 +0000)
commit38b696a7eb3e3b701819b50190794cc1621675c7
tree5f844a2d83bc122727b5f918c9e2289c99dab8b0
parent8458016a4042057668d87b279623579ee66070b7
[WebAssembly] MC: Ensure that FUNCTION_OFFSET relocations are always against function symbols.

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

Differential Revision: https://reviews.llvm.org/D46970

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332517 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/WasmObjectWriter.cpp
test/MC/WebAssembly/debug-info.ll