From cc602061ee860b041013397e27a036b85cd87b09 Mon Sep 17 00:00:00 2001 From: Geza Lore Date: Mon, 18 Jan 2016 00:21:51 +0100 Subject: x86inc: Add debug symbols indicating sizes of compiled functions Some debuggers/profilers use this metadata to determine which function a given instruction is in; without it they get can confused by local labels (if you haven't stripped those). On the other hand, some tools are still confused even with this metadata. e.g. this fixes `gdb`, but not `perf`. Currently only implemented for ELF. Signed-off-by: Anton Khirnov --- tests/checkasm/x86/checkasm.asm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/checkasm/x86/checkasm.asm b/tests/checkasm/x86/checkasm.asm index 52d10aec5c..55212fc24b 100644 --- a/tests/checkasm/x86/checkasm.asm +++ b/tests/checkasm/x86/checkasm.asm @@ -66,14 +66,14 @@ cextern fail_func ;----------------------------------------------------------------------------- cglobal stack_clobber, 1,2 ; Clobber the stack with junk below the stack pointer - %define size (max_args+6)*8 - SUB rsp, size - mov r1, size-8 + %define argsize (max_args+6)*8 + SUB rsp, argsize + mov r1, argsize-8 .loop: mov [rsp+r1], r0 sub r1, 8 jge .loop - ADD rsp, size + ADD rsp, argsize RET %if WIN64 -- cgit v1.2.3