[PATCH] D96659: [WebAssembly] Add new relocation for pc-rel data
Yuta Saito via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 13 21:16:25 PST 2021
kateinoigakukun created this revision.
Herald added subscribers: ecnelises, pengfei, sunfish, hiraditya, jgravelle-google, sbc100, dschuff.
kateinoigakukun requested review of this revision.
Herald added subscribers: llvm-commits, aheejin.
Herald added a project: LLVM.
This `R_WASM_MEMORY_ADDR_SELFREL_I32` relocation represents an offset
between its relocating address and the symbol address. It's very similar
to `R_X86_64_PC32` but restricted to be used for only data segments.
S + A - P
A: Represents the addend used to compute the value of the relocatable
field.
P: Represents the place of the storage unit being relocated.
S: Represents the value of the symbol whose index resides in the
relocation entry.
Proposal: https://github.com/WebAssembly/tool-conventions/issues/162
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D96659
Files:
lld/test/wasm/selfrel-reloc.ll
lld/wasm/InputChunks.cpp
lld/wasm/InputFiles.cpp
lld/wasm/InputFiles.h
llvm/include/llvm/BinaryFormat/WasmRelocs.def
llvm/include/llvm/MC/MCWasmObjectWriter.h
llvm/lib/BinaryFormat/Wasm.cpp
llvm/lib/MC/WasmObjectWriter.cpp
llvm/lib/Object/RelocationResolver.cpp
llvm/lib/Object/WasmObjectFile.cpp
llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp
llvm/test/MC/WebAssembly/bad-fixup-expr.s
llvm/test/MC/WebAssembly/selfrel.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96659.323593.patch
Type: text/x-patch
Size: 20068 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210214/c1166c13/attachment.bin>
More information about the llvm-commits
mailing list