File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -2571,9 +2571,12 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
2571
2571
ctx.symtab .addLibcall (s);
2572
2572
}
2573
2573
2574
- // Windows specific -- if __load_config_used can be resolved, resolve it.
2575
- if (ctx.symtab .findUnderscore (" _load_config_used" ))
2576
- ctx.symtab .addGCRoot (ctx.symtab .mangle (" _load_config_used" ));
2574
+ ctx.forEachSymtab ([&](SymbolTable &symtab) {
2575
+ // Windows specific -- if __load_config_used can be resolved, resolve
2576
+ // it.
2577
+ if (symtab.findUnderscore (" _load_config_used" ))
2578
+ symtab.addGCRoot (symtab.mangle (" _load_config_used" ));
2579
+ });
2577
2580
2578
2581
if (args.hasArg (OPT_include_optional)) {
2579
2582
// Handle /includeoptional
Original file line number Diff line number Diff line change 7
7
// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows loadconfig-ec.s -o loadconfig-ec.obj
8
8
// RUN: llvm-mc -filetype=obj -triple=aarch64-windows loadconfig-short.s -o loadconfig-short.obj
9
9
// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows loadconfig-short.s -o loadconfig-short-arm64ec.obj
10
+ // RUN: llvm-lib -machine:arm64x -out:loadconfig.lib loadconfig.obj loadconfig-ec.obj
10
11
11
12
// RUN: lld-link -machine:arm64x -out:out-warn.dll -dll -noentry test.obj \
12
13
// RUN: 2>&1 | FileCheck --check-prefixes=WARN-LOADCFG,WARN-EC-LOADCFG %s
158
159
// BASERELOC-NEXT: Address: 0x2074
159
160
// BASERELOC-NEXT: }
160
161
162
+ // RUN: lld-link -machine:arm64x -out:out-hyb-lib.dll -dll -noentry loadconfig.lib chpe.obj test.obj
163
+ // RUN: llvm-readobj --coff-load-config out-hyb-lib.dll | FileCheck --check-prefix=LOADCFG %s
164
+ // RUN: llvm-readobj --coff-basereloc out-hyb-lib.dll | FileCheck --check-prefix=BASERELOC %s
165
+
161
166
#--- test.s
162
167
.data
163
168
sym:
You can’t perform that action at this time.
0 commit comments