DragonFly BSD
DragonFly commits List (threaded) for 2012-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: rtld: Clang fixes

From: John Marino <marino@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 14 Jan 2012 05:43:14 -0800 (PST)

commit 8301820ef8df692f611b357f285fe4ddca9e5710
Author: John Marino <draco@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(-)


DragonFly BSD source repository

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]