[WebAssembly][MC] Simplify WasmObjectWriter::recordRelocation. NFC.
authorSam Clegg <sbc@chromium.org>
Tue, 20 Aug 2019 00:33:50 +0000 (00:33 +0000)
committerSam Clegg <sbc@chromium.org>
Tue, 20 Aug 2019 00:33:50 +0000 (00:33 +0000)
commitecc5e8084f500958f3c84335b214b3964356bc15
treef918ed7247cb4b66784e1fbeca39818575e97d19
parent8f9e489a6658a77267f4ebcf59b639c0c26a183d
[WebAssembly][MC] Simplify WasmObjectWriter::recordRelocation. NFC.

WebAssembly doesn't support PC relative relocation or relocation
expressions that can't be reduced to single symbol.

The only support for we have for fixups involving two symbols are when
both symbols are defined and withing the same section.  In this case
evaluateFixup will already have evaluated to the expression before
calling recordRelocation.

llvm-svn: 369317
llvm/lib/MC/WasmObjectWriter.cpp
llvm/test/MC/WebAssembly/bad-fixup-expr.s [new file with mode: 0644]