[PATCH] D80774: [WebAssembly] Add placeholders for R_WASM_TABLE_INDEX_REL_SLEB relocations
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 28 19:15:32 PDT 2020
sbc100 created this revision.
Herald added subscribers: llvm-commits, arphaman, sunfish, aheejin, hiraditya, jgravelle-google, dschuff.
Herald added a project: LLVM.
sbc100 added a reviewer: dschuff.
sbc100 added a comment.
Sorry @dschuff .. not sure who else to send these types of reviews to :)
Previously in the object format we punted on this and simply wrote
zeros (and didn't include the function in the elem segment). With
this change we write a meaningful value which is the segment
relative table index of the associated function.
This matches the that wasm-ld produces in `-r` mode. This incosistency
bettween the output the MC object writer and the wasm-ld object
writer could cause warnings to be emitted when reading back in the
output of `wasm-ld -r`. See:
https://github.com/emscripten-core/emscripten/issues/11217
This only applies to this one relocation type which is only generated
when compiling in PIC mode.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80774
Files:
lld/wasm/InputFiles.cpp
lld/wasm/InputFiles.h
llvm/lib/MC/WasmObjectWriter.cpp
llvm/test/MC/WebAssembly/reloc-pic.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80774.267108.patch
Type: text/x-patch
Size: 4134 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200529/fe9f9b80/attachment-0001.bin>
More information about the llvm-commits
mailing list