From: Joseph Myers Date: Tue, 16 Jan 2018 20:53:03 +0000 (+0000) Subject: Use LIBGCC_S_SO in x86_64 backtrace. X-Git-Tag: glibc-2.27~127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4942c4ea48099b4ba9dfecf7cfbc452ae74811b5;p=thirdparty%2Fglibc.git Use LIBGCC_S_SO in x86_64 backtrace. The x86_64 backtrace implementation is used as a generic implementation (unwinding via unwind info and _Unwind_Backtrace) by various other architectures. This patch makes it more generic by making it use LIBGCC_S_SO from gnu/lib-names.h instead of hardcoding the libgcc_s.so.1 name, so that it can also be used on hppa which uses libgcc_s.so.4. Tested for x86_64. * sysdeps/x86_64/backtrace.c: Include . (init): Use LIBGCC_S_SO not hardcoded "libgcc_s.so.1". --- diff --git a/ChangeLog b/ChangeLog index 9d96be03d84..42f871e4fc5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-01-16 Joseph Myers + + * sysdeps/x86_64/backtrace.c: Include . + (init): Use LIBGCC_S_SO not hardcoded "libgcc_s.so.1". + 2018-01-16 Florian Weimer * nptl/Makefile [$(have-cxx-thread_local)] (tests-unsupported): diff --git a/sysdeps/x86_64/backtrace.c b/sysdeps/x86_64/backtrace.c index 2706b50a05e..d423cc053a4 100644 --- a/sysdeps/x86_64/backtrace.c +++ b/sysdeps/x86_64/backtrace.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -49,7 +50,7 @@ dummy_getcfa (struct _Unwind_Context *ctx __attribute__ ((unused))) static void init (void) { - libgcc_handle = __libc_dlopen ("libgcc_s.so.1"); + libgcc_handle = __libc_dlopen (LIBGCC_S_SO); if (libgcc_handle == NULL) return;