[WebAssembly][lld] Fix crash when applying relocations to debug sections
commitd6c1c3b13a091f3e0691bef01759f28e5740ea70
authorSam Clegg <sbc@chromium.org>
Tue, 20 Aug 2019 18:39:24 +0000 (20 18:39 +0000)
committerSam Clegg <sbc@chromium.org>
Tue, 20 Aug 2019 18:39:24 +0000 (20 18:39 +0000)
treefcdf1666fc9a8ec127477a0d51df2b8df638afa3
parente687343b4cc8a7f7b3903788ecdd628239772eba
[WebAssembly][lld] Fix crash when applying relocations to debug sections

Debug sections are special in that they can contain relocations against
symbols that are not present in the final output (i.e. not live).
However it is also possible to have R_WASM_TABLE_INDEX relocations
against symbols that don't have a table index assigned (since they are
not address taken by actual code.

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369423 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/MCParser/WasmAsmParser.cpp