[lld] [lld][WebAssembly]: Defer __wasm_apply_data_relocs decision to writer… (PR #109249)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 19 06:24:40 PDT 2024


================
@@ -378,7 +378,7 @@ void InputChunk::generateRelocationCode(raw_ostream &os) const {
     uint64_t offset = getVA(rel.Offset) - getInputSectionOffset();
 
     Symbol *sym = file->getSymbol(rel);
-    if (!ctx.isPic && sym->isDefined())
+    if (!ctx.isPic && !sym->hasGOTIndex())
----------------
sbc100 wrote:

Is this change needed as part of this change?   I think this line could probably use a comment.   i.e. Why are we skipping these relocations?

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


More information about the llvm-commits mailing list