aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/WasmObjectFile.cpp
diff options
context:
space:
mode:
authorHood Chatham <roberthoodchatham@gmail.com>2025-02-24 18:15:41 +0100
committerGitHub <noreply@github.com>2025-02-24 09:15:41 -0800
commitcc7f22ee6ccb2c1ad79834e06d5b18d8f014d140 (patch)
tree2df4073d8d7f087d84cc36f0dd95fa2969a5b85c /llvm/lib/Object/WasmObjectFile.cpp
parentf1252f539ca203a979d61b616186e9be9d612f96 (diff)
downloadllvm-cc7f22ee6ccb2c1ad79834e06d5b18d8f014d140.zip
llvm-cc7f22ee6ccb2c1ad79834e06d5b18d8f014d140.tar.gz
llvm-cc7f22ee6ccb2c1ad79834e06d5b18d8f014d140.tar.bz2
[object][WebAssembly] Add support for RUNTIME_PATH to yaml2obj and obj2yaml (#126080)
This is the first step of adding RPATH support for wasm. See corresponding update to the WebAssembly/tool-conventions repo on dynamic linking: https://github.com/WebAssembly/tool-conventions/pull/246
Diffstat (limited to 'llvm/lib/Object/WasmObjectFile.cpp')
-rw-r--r--llvm/lib/Object/WasmObjectFile.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Object/WasmObjectFile.cpp b/llvm/lib/Object/WasmObjectFile.cpp
index 0f6fd56..98c4b9d 100644
--- a/llvm/lib/Object/WasmObjectFile.cpp
+++ b/llvm/lib/Object/WasmObjectFile.cpp
@@ -484,6 +484,13 @@ Error WasmObjectFile::parseDylink0Section(ReadContext &Ctx) {
}
break;
}
+ case wasm::WASM_DYLINK_RUNTIME_PATH: {
+ Count = readVaruint32(Ctx);
+ while (Count--) {
+ DylinkInfo.RuntimePath.push_back(readString(Ctx));
+ }
+ break;
+ }
default:
LLVM_DEBUG(dbgs() << "unknown dylink.0 sub-section: " << Type << "\n");
Ctx.Ptr += Size;