Enable invop handler on module load

It sets a fbt handler to dtrace_invop_jump_addr on module load,
which is used to call the dtrace probing function from the trap
handler.
This commit is contained in:
ozaki-r 2014-03-15 07:49:15 +00:00
parent 26e6962bfe
commit 48e9045322
1 changed files with 11 additions and 0 deletions

View File

@ -202,13 +202,24 @@ END(dtrace_copystr)
void dtrace_invop_init(void)
*/
ENTRY(dtrace_invop_init)
ldr r1, .Ldtrace_invop
ldr r2, .Ldtrace_invop_jump_addr
str r1, [r2]
RET
.align 0
.Ldtrace_invop:
.word dtrace_invop
.Ldtrace_invop_jump_addr:
.word dtrace_invop_jump_addr
END(dtrace_invop_init)
/*
void dtrace_invop_uninit(void)
*/
ENTRY(dtrace_invop_uninit)
mov r0, #0
ldr r1, .Ldtrace_invop_jump_addr
str r0, [r1]
RET
END(dtrace_invop_uninit)