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 @@ -2563,14 +2563,14 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
25632563 // it.
25642564 if (symtab.findUnderscore (" _load_config_used" ))
25652565 symtab.addGCRoot (symtab.mangle (" _load_config_used" ));
2566- });
25672566
2568- if (args.hasArg (OPT_include_optional)) {
2569- // Handle /includeoptional
2570- for (auto *arg : args.filtered (OPT_include_optional))
2571- if (isa_and_nonnull<LazyArchive>(ctx.symtab .find (arg->getValue ())))
2572- ctx.symtab .addGCRoot (arg->getValue ());
2573- }
2567+ if (args.hasArg (OPT_include_optional)) {
2568+ // Handle /includeoptional
2569+ for (auto *arg : args.filtered (OPT_include_optional))
2570+ if (isa_and_nonnull<LazyArchive>(symtab.find (arg->getValue ())))
2571+ symtab.addGCRoot (arg->getValue ());
2572+ }
2573+ });
25742574 } while (run ());
25752575 }
25762576
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