cpython/Python/asm_trampoline_riscv64.S
Zanie Blue 1ff83ad7ad
gh-128883: Store ELF perf trampoline templates in read-only data (#160366)
CPython copies the trampoline templates into executable memory. Keep the
ELF source in .rodata so BOLT preserves its bytes and boundaries.

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2026-10-23 19:29:45 +00:00

13 lines
368 B
ArmAsm

/* CPython copies this template into executable memory. */
.section .rodata
.globl _Py_trampoline_func_start
_Py_trampoline_func_start:
addi sp,sp,-16
sd ra,8(sp)
jalr a3
ld ra,8(sp)
addi sp,sp,16
jr ra
.globl _Py_trampoline_func_end
_Py_trampoline_func_end:
.section .note.GNU-stack,"",@progbits