[lld] [lld][WebAssembly] Report Unsupported PIC Relocations as Errors (PR #104926)
Luc Blaeser via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 22 06:27:13 PDT 2024
================
@@ -173,6 +173,22 @@ void scanRelocations(InputChunk *chunk) {
}
}
+ if (sym->isUndefined()) {
+ switch (reloc.Type) {
+ case R_WASM_TABLE_INDEX_REL_SLEB:
+ case R_WASM_TABLE_INDEX_REL_SLEB64:
+ case R_WASM_MEMORY_ADDR_REL_SLEB:
+ case R_WASM_MEMORY_ADDR_REL_SLEB64:
+ // These relocation types are only present in the code section and
+ // are not supported for undefined symbols. It would require replacing
+ // the constant by using a GOT global.
----------------
luc-blaeser wrote:
Thanks. I improved the comment.
https://github.com/llvm/llvm-project/pull/104926
More information about the llvm-commits
mailing list