File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -536,6 +536,15 @@ void SymbolTable::initializeLoadConfig() {
536
536
auto sym =
537
537
dyn_cast_or_null<DefinedRegular>(findUnderscore (" _load_config_used" ));
538
538
if (!sym) {
539
+ if (isEC ()) {
540
+ Warn (ctx) << " EC version of '_load_config_used' is missing" ;
541
+ return ;
542
+ }
543
+ if (ctx.hybridSymtab ) {
544
+ Warn (ctx) << " native version of '_load_config_used' is missing for "
545
+ " ARM64X target" ;
546
+ return ;
547
+ }
539
548
if (ctx.config .guardCF != GuardCFLevel::Off)
540
549
Warn (ctx)
541
550
<< " Control Flow Guard is enabled but '_load_config_used' is missing" ;
Original file line number Diff line number Diff line change 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
10
11
- // RUN: lld-link -machine:arm64x -out:out.dll -dll -noentry loadconfig.obj test.obj
11
+ // RUN: lld-link -machine:arm64x -out:out-warn.dll -dll -noentry test.obj \
12
+ // RUN: 2>&1 | FileCheck --check-prefixes=WARN-LOADCFG,WARN-EC-LOADCFG %s
13
+ // WARN-LOADCFG: lld-link: warning: native version of '_load_config_used' is missing for ARM64X target
14
+ // WARN-EC-LOADCFG: lld-link: warning: EC version of '_load_config_used' is missing
15
+
16
+ // RUN: lld-link -machine:arm64x -out:out-nonative.dll -dll -noentry loadconfig-ec.obj chpe.obj \
17
+ // RUN: 2>&1 | FileCheck --check-prefixes=WARN-LOADCFG --implicit-check-not EC %s
18
+
19
+ // RUN: lld-link -machine:arm64ec -out:out-ec.dll -dll -noentry chpe.obj \
20
+ // RUN: 2>&1 | FileCheck --check-prefixes=WARN-EC-LOADCFG --implicit-check-not native %s
21
+
22
+ // RUN: lld-link -machine:arm64x -out:out.dll -dll -noentry loadconfig.obj test.obj \
23
+ // RUN: 2>&1 | FileCheck --check-prefixes=WARN-EC-LOADCFG --implicit-check-not native %s
12
24
13
25
// RUN: llvm-readobj --coff-load-config out.dll | FileCheck --check-prefix=DYNRELOCS %s
14
26
// DYNRELOCS: DynamicValueRelocTableOffset: 0xC
You can’t perform that action at this time.
0 commit comments