[PATCH] D155542: [lld][WebAssembly] Fix func reloc for internal GOT with extended-const
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 24 09:30:58 PDT 2023
sbc100 added inline comments.
================
Comment at: lld/wasm/SyntheticSections.cpp:510
+ writeU8(os, is64 ? WASM_OPCODE_I64_ADD : WASM_OPCODE_I32_ADD, "add");
+ writeU8(os, WASM_OPCODE_END, "opcode:end");
} else {
----------------
Can we combine these two blocks into a single `if (config->extendedConst && config->isPic)` block that handles these? (since they share most of the code).
Also, shouldn't there be a corresponding change to __wasm_apply_global_relocs to avoid applying a relocation?
Also, can you add a test for this (I would imagine by modifying `lld/test/wasm/pie.ll` perhaps?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155542/new/
https://reviews.llvm.org/D155542
More information about the llvm-commits
mailing list