arm64: Declare exception handlers as STATIC_FUNCTION

Branch inside exception vector slot is emitted through PLT veneer,
which clobbers x16 and x17.

Making the function static removes the veneer, and fixes the problem.

Change-Id: If8810999675b6e36926be9806e23a78b7e5c0f10
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7509
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This commit is contained in:
milek7 2024-03-07 03:27:54 +01:00 committed by Fredrik Holmqvist
parent 02463fb461
commit b6fd30b0ed

View File

@ -112,7 +112,7 @@ sub sp, sp, \xt
.endm
.macro EXCEPTION_HANDLER el name func
FUNCTION(handle_\name):
STATIC_FUNCTION(handle_\name):
EXCEPTION_ENTRY \el
// prepare aligned sp for C function