[lld] [lld][WebAssembly] Fix for --import-table when combined with reference types (PR #97451)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 2 11:11:49 PDT 2024


================
@@ -724,8 +724,11 @@ TableSymbol *SymbolTable::resolveIndirectFunctionTable(bool required) {
   }
 
   if (config->importTable) {
-    if (existing)
+    if (existing) {
+      existing->importModule = defaultModule;
----------------
sbc100 wrote:

This function only deal with one very particular table (`__indirect_function_table`).   This table is implicitly generated by the linker and we don't support defining it explicitly anywhere.    The import name is also fixed.  It should not be possible to attach any kind of custom import name to it.

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


More information about the llvm-commits mailing list