Skip to content

Commit 562efd6

Browse files
authored
[release/9.0] Fix compilation of runtime with Xcode 16 (#106800)
* Add missing .alt_entry to CoreCLR *_FakeProlog methods * Use .alt_entry on Apple platforms
1 parent 81af315 commit 562efd6

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed

src/coreclr/nativeaot/Runtime/unix/unixasmmacrosamd64.inc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ C_FUNC(\Name):
3333
.endm
3434

3535
.macro ALTERNATE_ENTRY Name
36+
#if defined(__APPLE__)
37+
.alt_entry C_FUNC(\Name)
38+
.private_extern C_FUNC(\Name)
39+
#else
3640
.global C_FUNC(\Name)
41+
#endif
3742
C_FUNC(\Name):
3843
.endm
3944

src/coreclr/nativeaot/Runtime/unix/unixasmmacrosarm64.inc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ C_FUNC(\Name):
2424
.endm
2525

2626
.macro ALTERNATE_ENTRY Name
27+
#if defined(__APPLE__)
28+
.alt_entry C_FUNC(\Name)
29+
.private_extern C_FUNC(\Name)
30+
#else
2731
.global C_FUNC(\Name)
28-
#if !defined(__APPLE__)
2932
.hidden C_FUNC(\Name)
3033
#endif
3134
C_FUNC(\Name):

src/coreclr/pal/inc/unixasmmacrosarm64.inc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@
1717
.endm
1818

1919
.macro PATCH_LABEL Name
20+
#if defined(__APPLE__)
21+
.alt_entry C_FUNC(\Name)
22+
.private_extern C_FUNC(\Name)
23+
#else
2024
.global C_FUNC(\Name)
25+
#endif
2126
C_FUNC(\Name):
2227
.endm
2328

src/coreclr/vm/arm64/asmhelpers.S

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,7 @@ NESTED_END ThePreStub, _TEXT
176176

177177
LEAF_ENTRY ThePreStubPatch, _TEXT
178178
nop
179-
.globl C_FUNC(ThePreStubPatchLabel)
180-
C_FUNC(ThePreStubPatchLabel):
179+
PATCH_LABEL ThePreStubPatchLabel
181180
ret lr
182181
LEAF_END ThePreStubPatch, _TEXT
183182

@@ -607,8 +606,12 @@ NESTED_END ResolveWorkerAsmStub, _TEXT
607606
#ifdef FEATURE_READYTORUN
608607

609608
NESTED_ENTRY DelayLoad_MethodCall_FakeProlog, _TEXT, NoHandler
610-
C_FUNC(DelayLoad_MethodCall):
609+
#if defined(__APPLE__)
610+
.alt_entry C_FUNC(DelayLoad_MethodCall)
611+
#endif
611612
.global C_FUNC(DelayLoad_MethodCall)
613+
C_FUNC(DelayLoad_MethodCall):
614+
612615
PROLOG_WITH_TRANSITION_BLOCK
613616

614617
add x0, sp, #__PWTB_TransitionBlock // pTransitionBlock
@@ -627,8 +630,11 @@ NESTED_END DelayLoad_MethodCall_FakeProlog, _TEXT
627630

628631
.macro DynamicHelper frameFlags, suffix
629632
NESTED_ENTRY DelayLoad_Helper\suffix\()_FakeProlog, _TEXT, NoHandler
630-
C_FUNC(DelayLoad_Helper\suffix):
633+
#if defined(__APPLE__)
634+
.alt_entry C_FUNC(DelayLoad_Helper\suffix)
635+
#endif
631636
.global C_FUNC(DelayLoad_Helper\suffix)
637+
C_FUNC(DelayLoad_Helper\suffix):
632638

633639
PROLOG_WITH_TRANSITION_BLOCK
634640

0 commit comments

Comments
 (0)