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 @@ -601,6 +601,15 @@ void SymbolTable::initializeLoadConfig() {
601
601
auto sym =
602
602
dyn_cast_or_null<DefinedRegular>(findUnderscore (" _load_config_used" ));
603
603
if (!sym) {
604
+ if (isEC ()) {
605
+ Warn (ctx) << " EC version of '_load_config_used' is missing" ;
606
+ return ;
607
+ }
608
+ if (ctx.hybridSymtab ) {
609
+ Warn (ctx) << " native version of '_load_config_used' is missing for "
610
+ " ARM64X target" ;
611
+ return ;
612
+ }
604
613
if (ctx.config .guardCF != GuardCFLevel::Off)
605
614
Warn (ctx)
606
615
<< " 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