[LLD][COFF] Add support for -includeglob on ARM64X (#129515)

Include symbols from both symbol tables.
This commit is contained in:
Jacek Caban
2025-03-03 22:39:42 +01:00
committed by GitHub
parent 8f971ca1d9
commit 2d0eb5df4f
2 changed files with 5 additions and 1 deletions

View File

@@ -2568,7 +2568,8 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
// Handle /includeglob
for (StringRef pat : args::getStrings(args, OPT_incl_glob))
ctx.symtab.addUndefinedGlob(pat);
ctx.forEachSymtab(
[&](SymbolTable &symtab) { symtab.addUndefinedGlob(pat); });
// Create wrapped symbols for -wrap option.
ctx.forEachSymtab([&](SymbolTable &symtab) {

View File

@@ -11,6 +11,9 @@
// RUN: llvm-readobj --hex-dump=.test %t.dll | FileCheck %s
// CHECK: 0x180004000 01000000 01000000
// RUN: lld-link -machine:arm64x -dll -noentry -out:%t-glob.dll %t-test.lib -includeglob:sym
// RUN: llvm-readobj --hex-dump=.test %t-glob.dll | FileCheck %s
.globl sym
.section .test,"dr"
sym: