[lld] [lld][WebAssembly] Error on unexptected relocation types in `-pie/`-shared` data sections (PR #162117)

Derek Schuff via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 6 10:15:20 PDT 2025


================
@@ -406,6 +406,13 @@ uint64_t InputChunk::getVA(uint64_t offset) const {
   return (outputSeg ? outputSeg->startVA : 0) + getChunkOffset(offset);
 }
 
+bool isValidRuntimeRelocation(WasmRelocType type) {
+  // TODO(https://github.com/llvm/llvm-project/issues/146923): Add
+  // R_WASM_FUNCTION_INDEX_I32 to this list
----------------
dschuff wrote:

this wouldn't necessarily have to be a runtime relocation though right? Maybe the comment should be rephrased to say something more like what we actually want (i.e. supporting FUNCTION_INDEX in the data section). Presumably it would look more like FUNCTION_OFFSET (which is supported today) than like these reloc types.

https://github.com/llvm/llvm-project/pull/162117


More information about the llvm-commits mailing list