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

git: Support exception handling on statically-linked binaries


From: John Marino <marino@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 5 Feb 2012 08:33:18 -0800 (PST)

commit f0a144b4cd77939fee0b0171ff4fe144eb3fef42
Author: John Marino <draco@marino.st>
Date:   Sun Feb 5 17:21:27 2012 +0100

    Support exception handling on statically-linked binaries
    
    The real-time dynamic linker handles exceptions on dynamically-linked
    binaries through the dl_iterate_phdr function.  The RTLD isn't invoked
    on statically-built executables so thrown exceptions weren't getting
    handled.  There was a dummy dl_iterate_phdr function in libc with a
    weak symbol that gets looked at when the rtld version isn't present.
    This function was populated and gets called when the statically-linked
    executable throws an exception.
    
    It requires the GNU_EH_FRAME program header to be present.  The base
    gcc 4.4 spec file was modified to emit this header for statically-built
    binaries in addition to the dynamically lined ones.

Summary of changes:
 contrib/gcc-4.4/gcc/config/dragonfly.h |    3 +-
 lib/libc/gen/dlfcn.c                   |   60 ++++++++++++++++++++++++++++++-
 2 files changed, 59 insertions(+), 4 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f0a144b4cd77939fee0b0171ff4fe144eb3fef42


-- 
DragonFly BSD source repository



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