summaryrefslogtreecommitdiff
path: root/sysdeps/x86_64
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2018-01-16 20:53:03 +0000
committerJoseph Myers <joseph@codesourcery.com>2018-01-16 20:53:03 +0000
commit4942c4ea48099b4ba9dfecf7cfbc452ae74811b5 (patch)
tree9f164e18eb51ad7eb1f09509dbdacfa96df76713 /sysdeps/x86_64
parent10d200dbace0ea5198006b313f40c3b884c88724 (diff)
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 <gnu/lib-names.h>. (init): Use LIBGCC_S_SO not hardcoded "libgcc_s.so.1".
Diffstat (limited to 'sysdeps/x86_64')
-rw-r--r--sysdeps/x86_64/backtrace.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/x86_64/backtrace.c b/sysdeps/x86_64/backtrace.c
index 2706b50a05..d423cc053a 100644
--- a/sysdeps/x86_64/backtrace.c
+++ b/sysdeps/x86_64/backtrace.c
@@ -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;