From 1713a22ef442a92f633115bb52cd86dd6acc0a6c Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Sun, 24 Apr 2022 22:07:39 +0200 Subject: [PATCH] Add ret to avoid data being "executed" --- src/dynafunc_aarch64_gnu.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dynafunc_aarch64_gnu.S b/src/dynafunc_aarch64_gnu.S index 1b7d56a..3e810e2 100644 --- a/src/dynafunc_aarch64_gnu.S +++ b/src/dynafunc_aarch64_gnu.S @@ -23,9 +23,10 @@ .global g_dynafunc_end g_dynafunc: - ldr x0, .+12 - ldr x9, .+16 + ldr x0, .+16 + ldr x9, .+20 br x9 + ret .dword 0xdeadbeefdeadbeef //function parameter .dword 0xbadc0ffee0ddf00d //function pointer g_dynafunc_end: