Skip to content

Use .alt_entry on Apple platforms in assembly helpers #106442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/coreclr/nativeaot/Runtime/unix/unixasmmacrosamd64.inc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ C_FUNC(\Name):
.endm

.macro ALTERNATE_ENTRY Name
#if defined(__APPLE__)
.alt_entry C_FUNC(\Name)
.private_extern C_FUNC(\Name)
#else
.global C_FUNC(\Name)
#endif
C_FUNC(\Name):
.endm

Expand Down
5 changes: 4 additions & 1 deletion src/coreclr/nativeaot/Runtime/unix/unixasmmacrosarm64.inc
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ C_FUNC(\Name):
.endm

.macro ALTERNATE_ENTRY Name
#if defined(__APPLE__)
.alt_entry C_FUNC(\Name)
.private_extern C_FUNC(\Name)
#else
.global C_FUNC(\Name)
#if !defined(__APPLE__)
.hidden C_FUNC(\Name)
#endif
C_FUNC(\Name):
Expand Down
5 changes: 5 additions & 0 deletions src/coreclr/pal/inc/unixasmmacrosarm64.inc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@
.endm

.macro PATCH_LABEL Name
#if defined(__APPLE__)
.alt_entry C_FUNC(\Name)
.private_extern C_FUNC(\Name)
#else
.global C_FUNC(\Name)
#endif
C_FUNC(\Name):
.endm

Expand Down
3 changes: 1 addition & 2 deletions src/coreclr/vm/arm64/asmhelpers.S
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ NESTED_END ThePreStub, _TEXT

LEAF_ENTRY ThePreStubPatch, _TEXT
nop
.globl C_FUNC(ThePreStubPatchLabel)
C_FUNC(ThePreStubPatchLabel):
PATCH_LABEL ThePreStubPatchLabel
ret lr
LEAF_END ThePreStubPatch, _TEXT

Expand Down
Loading