]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use LIBGCC_S_SO in x86_64 backtrace.
authorJoseph Myers <joseph@codesourcery.com>
Tue, 16 Jan 2018 20:53:03 +0000 (20:53 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 16 Jan 2018 20:53:03 +0000 (20:53 +0000)
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 <gnu/lib-names.h>.
(init): Use LIBGCC_S_SO not hardcoded "libgcc_s.so.1".

ChangeLog
sysdeps/x86_64/backtrace.c

index 9d96be03d841dfaee6419844d1e3fb9f9cf62731..42f871e4fc5de714334a0fe3d8b1b67e1b7dcc16 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-16  Joseph Myers  <joseph@codesourcery.com>
+
+       * sysdeps/x86_64/backtrace.c: Include <gnu/lib-names.h>.
+       (init): Use LIBGCC_S_SO not hardcoded "libgcc_s.so.1".
+
 2018-01-16  Florian Weimer  <fweimer@redhat.com>
 
        * nptl/Makefile [$(have-cxx-thread_local)] (tests-unsupported):
index 2706b50a05ece7b84344c1a18d6a371a5a0d8c15..d423cc053a44ac7bc323736986bf34ad8c8d7239 100644 (file)
@@ -20,6 +20,7 @@
 #include <libc-lock.h>
 #include <dlfcn.h>
 #include <execinfo.h>
+#include <gnu/lib-names.h>
 #include <stdlib.h>
 #include <unwind.h>
 
@@ -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;