mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
aarch64: Add support for indirect branch targets in the function macro
The function macro emits AARCH64_VALID_CALL_TARGET for exported symbols, marking them as valid destinations for indirect _calls_. Functions that are reached by indirect _branches_ (i.e. tail-call dispatch chains where the link register is not set) require AARCH64_VALID_JUMP_TARGET instead. This commit adds a "jumpable" parameter to the function macro that, when set, emits AARCH64_VALID_JUMP_TARGET instead of AARCH64_VALID_CALL_TARGET. Sponsored-by: Sovereign Tech Fund Signed-off-by: Ramiro Polla <ramiro.polla@gmail.com>
This commit is contained in:
@@ -256,7 +256,7 @@ DISABLE_SME2
|
||||
.popsection
|
||||
#endif
|
||||
|
||||
.macro function name, export=0, align=4
|
||||
.macro function name, export=0, jumpable=0, align=4
|
||||
.macro endfunc
|
||||
ELF .size \name, . - \name
|
||||
FUNC .endfunc
|
||||
@@ -269,7 +269,11 @@ FUNC .endfunc
|
||||
ELF .type EXTERN_ASM\name, %function
|
||||
FUNC .func EXTERN_ASM\name
|
||||
EXTERN_ASM\name:
|
||||
.if \jumpable
|
||||
AARCH64_VALID_JUMP_TARGET
|
||||
.else
|
||||
AARCH64_VALID_CALL_TARGET
|
||||
.endif
|
||||
.else
|
||||
ELF .type \name, %function
|
||||
FUNC .func \name
|
||||
|
||||
Reference in New Issue
Block a user