From b18c0a5533a6898f000a4cbcdbf0ee7b0b17ff62 Mon Sep 17 00:00:00 2001 From: myungsik Date: Sun, 3 Sep 2017 05:55:13 +0900 Subject: [PATCH 1/2] issue clear issue number#1 --- arch/x86_64/plthook.S | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/arch/x86_64/plthook.S b/arch/x86_64/plthook.S index baa6b52..4f89375 100644 --- a/arch/x86_64/plthook.S +++ b/arch/x86_64/plthook.S @@ -1,22 +1,23 @@ +/*sss*/ .globl plt_hooker plt_hooker: .cfi_startproc /* PLT code already pushed symbol and module indices */ .cfi_adjust_cfa_offset 16 - sub $48, %rsp - .cfi_adjust_cfa_offset 48 - movq %rdi, 40(%rsp) - .cfi_offset rdi, -32 - movq %rsi, 32(%rsp) - .cfi_offset rsi, -40 - movq %rdx, 24(%rsp) - .cfi_offset rdx, -48 - movq %rcx, 16(%rsp) - .cfi_offset rcx, -56 - movq %r8, 8(%rsp) - .cfi_offset r8, -64 - movq %r9, 0(%rsp) - .cfi_offset r9, -72 + sub $56, %rsp + .cfi_adjust_cfa_offset 56 + movq %rdi, 48(%rsp) + .cfi_offset rdi, -24 + movq %rsi, 40(%rsp) + .cfi_offset rsi, -32 + movq %rdx, 32(%rsp) + .cfi_offset rdx, -40 + movq %rcx, 24(%rsp) + .cfi_offset rcx, -48 + movq %r8, 16(%rsp) + .cfi_offset r8, -56 + movq %r9, 8(%rsp) + .cfi_offset r9, -64 /* child idx */ movq 56(%rsp), %rsi From 09dd8cf433553671c77ea90e3022d0e1add820fd Mon Sep 17 00:00:00 2001 From: myungsik Date: Sun, 3 Sep 2017 06:02:08 +0900 Subject: [PATCH 2/2] mcount: Fix return value of PLT functions --- arch/x86_64/plthook.S | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86_64/plthook.S b/arch/x86_64/plthook.S index 4f89375..9612813 100644 --- a/arch/x86_64/plthook.S +++ b/arch/x86_64/plthook.S @@ -1,4 +1,3 @@ -/*sss*/ .globl plt_hooker plt_hooker: .cfi_startproc