diff options
| author | Sam Clegg <sbc@chromium.org> | 2019-04-04 17:43:50 +0000 |
|---|---|---|
| committer | Sam Clegg <sbc@chromium.org> | 2019-04-04 17:43:50 +0000 |
| commit | 2a7cac932bbca5492e5a42d9dac33e0cb76d0f83 (patch) | |
| tree | 64e21da525922e0a2d7fc39421ecd1d879f963d6 /lld/wasm/InputChunks.cpp | |
| parent | 98e3954fe9d6ab74888c8757284136134330e475 (diff) | |
| download | bcm5719-llvm-2a7cac932bbca5492e5a42d9dac33e0cb76d0f83.tar.gz bcm5719-llvm-2a7cac932bbca5492e5a42d9dac33e0cb76d0f83.zip | |
[WebAssembly] Add new explicit relocation types for PIC relocations
See https://github.com/WebAssembly/tool-conventions/pull/106
Differential Revision: https://reviews.llvm.org/D59907
llvm-svn: 357710
Diffstat (limited to 'lld/wasm/InputChunks.cpp')
| -rw-r--r-- | lld/wasm/InputChunks.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lld/wasm/InputChunks.cpp b/lld/wasm/InputChunks.cpp index 32157d3e8f2..cfa9eda7e2c 100644 --- a/lld/wasm/InputChunks.cpp +++ b/lld/wasm/InputChunks.cpp @@ -59,7 +59,9 @@ void InputChunk::verifyRelocTargets() const { ExistingValue = decodeULEB128(Loc, &BytesRead); break; case R_WASM_TABLE_INDEX_SLEB: + case R_WASM_TABLE_INDEX_REL_SLEB: case R_WASM_MEMORY_ADDR_SLEB: + case R_WASM_MEMORY_ADDR_REL_SLEB: ExistingValue = static_cast<uint32_t>(decodeSLEB128(Loc, &BytesRead)); break; case R_WASM_TABLE_INDEX_I32: @@ -119,7 +121,9 @@ void InputChunk::writeTo(uint8_t *Buf) const { encodeULEB128(Value, Loc, 5); break; case R_WASM_TABLE_INDEX_SLEB: + case R_WASM_TABLE_INDEX_REL_SLEB: case R_WASM_MEMORY_ADDR_SLEB: + case R_WASM_MEMORY_ADDR_REL_SLEB: encodeSLEB128(static_cast<int32_t>(Value), Loc, 5); break; case R_WASM_TABLE_INDEX_I32: |

