[lld] [LLD][COFF] Store reference to SymbolTable instead of COFFLinkerContext in InputFile (NFC) (PR #119296)

Jacek Caban via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 13 10:12:07 PST 2024


================
@@ -403,8 +404,8 @@ class BitcodeFile : public InputFile {
 // .dll file. MinGW only.
 class DLLFile : public InputFile {
 public:
-  explicit DLLFile(COFFLinkerContext &ctx, MemoryBufferRef m)
-      : InputFile(ctx, DLLKind, m) {}
+  explicit DLLFile(SymbolTable &symtab, MemoryBufferRef m)
----------------
cjacek wrote:

I'll change it to `COFFLinkerContext`. Importing DLLs is more complicated on ARM64X because those DLLs can themselves be ARM64X files. If that's the case, we need to detect it and create two `DLLFile` instances: one for the original memory buffer using the native namespace and another for the hybrid view obtained from `getHybridObjectView()`. With this mechanism, the caller will already know the exact namespace for the created file instance, so they might as well pass it. That said, we can probably address this later.

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


More information about the llvm-commits mailing list