Skip to content

Commit d98d3c2

Browse files
committed
[lld] Define __arm64x_native_entrypoint symbol.
1 parent f4be491 commit d98d3c2

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

lld/COFF/Driver.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2447,6 +2447,7 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
24472447
if (isArm64EC(config->machine)) {
24482448
ctx.symtab.addAbsolute("__arm64x_extra_rfe_table", 0);
24492449
ctx.symtab.addAbsolute("__arm64x_extra_rfe_table_size", 0);
2450+
ctx.symtab.addAbsolute("__arm64x_native_entrypoint", 0);
24502451
ctx.symtab.addAbsolute("__arm64x_redirection_metadata", 0);
24512452
ctx.symtab.addAbsolute("__arm64x_redirection_metadata_count", 0);
24522453
ctx.symtab.addAbsolute("__hybrid_auxiliary_iat", 0);

lld/COFF/Writer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2306,6 +2306,9 @@ void Writer::setECSymbols() {
23062306
replaceSymbol<DefinedSynthetic>(
23072307
iatCopySym, "__hybrid_auxiliary_iat_copy",
23082308
idata.auxIatCopy.empty() ? nullptr : idata.auxIatCopy.front());
2309+
2310+
Symbol *sym = ctx.symtab.findUnderscore("__arm64x_native_entrypoint");
2311+
cast<DefinedAbsolute>(sym)->setVA(ctx.config.imageBase);
23092312
}
23102313

23112314
// Write section contents to a mmap'ed file.

lld/test/COFF/Inputs/loadconfig-arm64ec.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ __chpe_metadata:
7575
.rva __os_arm64x_check_call
7676
.rva __os_arm64x_check_icall
7777
.rva __os_arm64x_check_icall_cfg
78-
.word 0 // __arm64x_native_entrypoint
78+
.rva __arm64x_native_entrypoint
7979
.rva __hybrid_auxiliary_iat
8080
.word __x64_code_ranges_to_entry_points_count
8181
.word __arm64x_redirection_metadata_count

0 commit comments

Comments
 (0)