File tree Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -2557,14 +2557,14 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
25572557 // it.
25582558 if (symtab.findUnderscore (" _load_config_used" ))
25592559 symtab.addGCRoot (symtab.mangle (" _load_config_used" ));
2560- });
25612560
2562- if (args.hasArg (OPT_include_optional)) {
2563- // Handle /includeoptional
2564- for (auto *arg : args.filtered (OPT_include_optional))
2565- if (isa_and_nonnull<LazyArchive>(ctx.symtab .find (arg->getValue ())))
2566- ctx.symtab .addGCRoot (arg->getValue ());
2567- }
2561+ if (args.hasArg (OPT_include_optional)) {
2562+ // Handle /includeoptional
2563+ for (auto *arg : args.filtered (OPT_include_optional))
2564+ if (isa_and_nonnull<LazyArchive>(symtab.find (arg->getValue ())))
2565+ symtab.addGCRoot (arg->getValue ());
2566+ }
2567+ });
25682568 } while (run ());
25692569 }
25702570
Original file line number Diff line number Diff line change 1+ // REQUIRE: aarch64
2+
3+ // RUN: llvm-mc -filetype=obj -triple=aarch64-windows %s -o %t.arm64.obj
4+ // RUN: llvm-mc -filetype=obj -triple=arm64ec-windows %s -o %t.arm64ec.obj
5+ // RUN: llvm-mc -filetype=obj -triple=arm64ec-windows %S/Inputs/loadconfig-arm64ec.s -o %t-loadconfig-arm64ec.obj
6+ // RUN: llvm-mc -filetype=obj -triple=aarch64-windows %S/Inputs/loadconfig-arm64.s -o %t-loadconfig-arm64.obj
7+
8+ // RUN: llvm-lib -machine:arm64x -out:%t-test.lib %t.arm64.obj %t.arm64ec.obj %t-loadconfig-arm64ec.obj %t-loadconfig-arm64.obj
9+ // RUN: lld-link -machine:arm64x -dll -noentry -out:%t.dll %t-test.lib -includeoptional:sym
10+
11+ // RUN: llvm-readobj --hex-dump=.test %t.dll | FileCheck %s
12+ // CHECK: 0x180004000 01000000 01000000
13+
14+ .globl sym
15+ .section .test ,"dr"
16+ sym:
17+ .word 1
You can’t perform that action at this time.
0 commit comments