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) {
25712571 ctx.symtab .addLibcall (s);
25722572 }
25732573
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+ });
25772580
25782581 if (args.hasArg (OPT_include_optional)) {
25792582 // Handle /includeoptional
Original file line number Diff line number Diff line change 77// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows loadconfig-ec.s -o loadconfig-ec.obj
88// RUN: llvm-mc -filetype=obj -triple=aarch64-windows loadconfig-short.s -o loadconfig-short.obj
99// 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
1011
1112// RUN: lld-link -machine:arm64x -out:out-warn.dll -dll -noentry test.obj \
1213// RUN: 2>&1 | FileCheck --check-prefixes=WARN-LOADCFG,WARN-EC-LOADCFG %s
158159// BASERELOC-NEXT: Address: 0x2074
159160// BASERELOC-NEXT: }
160161
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+
161166#--- test.s
162167 .data
163168sym:
You can’t perform that action at this time.
0 commit comments