Skip to content

Commit a02f3d5

Browse files
cjacekSquallATF
authored andcommitted
[LLD][COFF] Add support for -includeglob on ARM64X (llvm#129515)
Include symbols from both symbol tables.
1 parent 67f2f13 commit a02f3d5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lld/COFF/Driver.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2574,7 +2574,8 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
25742574

25752575
// Handle /includeglob
25762576
for (StringRef pat : args::getStrings(args, OPT_incl_glob))
2577-
ctx.symtab.addUndefinedGlob(pat);
2577+
ctx.forEachSymtab(
2578+
[&](SymbolTable &symtab) { symtab.addUndefinedGlob(pat); });
25782579

25792580
// Create wrapped symbols for -wrap option.
25802581
ctx.forEachSymtab([&](SymbolTable &symtab) {

lld/test/COFF/arm64x-includeoptional.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
// RUN: llvm-readobj --hex-dump=.test %t.dll | FileCheck %s
1212
// CHECK: 0x180004000 01000000 01000000
1313

14+
// RUN: lld-link -machine:arm64x -dll -noentry -out:%t-glob.dll %t-test.lib -includeglob:sym
15+
// RUN: llvm-readobj --hex-dump=.test %t-glob.dll | FileCheck %s
16+
1417
.globl sym
1518
.section .test,"dr"
1619
sym:

0 commit comments

Comments
 (0)