[PATCH] rtld, i386: Fix cfi directive in audit trampoline code

Jiri Olsa jolsa@redhat.com
Mon Aug 29 12:58:00 GMT 2011


hi,
_dl_runtime_profile function has wrong cfi directive when
rewinding stack back for the pltexit path.

Only 8 bytes - 2 'pop edx' instructions from the pltentry-only
code should be rewinded back.

With attached patch, I'm able to rewind stack correctly
throught the rtld code from audit library callback.

thanks,
jirka
---
2011-08-29  Jiri Olsa <jolsa@redhat.com>

	* sysdeps/i386/dl-trampoline.S (_dl_runtime_profile): Fix cfi
	directive.

diff --git a/sysdeps/i386/dl-trampoline.S b/sysdeps/i386/dl-trampoline.S
index 73b08ba..98d52f0 100644
--- a/sysdeps/i386/dl-trampoline.S
+++ b/sysdeps/i386/dl-trampoline.S
@@ -99,7 +99,7 @@ _dl_runtime_profile:
 	    +4      %edx
 	   %esp     free
 	*/
-	cfi_adjust_cfa_offset (12)
+	cfi_adjust_cfa_offset (8)
 1:	movl %ebx, (%esp)
 	cfi_rel_offset (ebx, 0)
 	movl %edx, %ebx		# This is the frame buffer size



More information about the Libc-alpha mailing list