git: rtld: Clang fixes
John Marino
marino at crater.dragonflybsd.org
Sat Jan 14 05:43:14 PST 2012
commit 8301820ef8df692f611b357f285fe4ddca9e5710
Author: John Marino <draco at marino.st>
Date: Sat Jan 14 13:28:14 2012 +0100
rtld: Clang fixes
1) Fix clang warnings
2) Fix r_debug_state function
The r_debug_state function is a hook required for gdb. Clang will inline
the function, but because it is empty, it won't generate any calls to it.
This results in gdb backtraces being corrupted. Fixed with the following
hack obtained from FreeBSD SVN 225366.
Fix it by marking the function __noinline, and inserting an empty asm
statement that pretends to clobber memory. This forces the compiler to
emit calls to the r_debug_state() function throughout rtld.c
Summary of changes:
libexec/rtld-elf/rtld.c | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8301820ef8df692f611b357f285fe4ddca9e5710
--
DragonFly BSD source repository
More information about the Commits
mailing list