This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: backtrace for hppa
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Zack Weinberg <zackw at panix dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Carlos O'Donell <carlos at redhat dot com>, <dave dot anglin at bell dot net>
- Date: Tue, 16 Jan 2018 16:53:48 +0000
- Subject: Re: backtrace for hppa
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.2.20.1801161611370.17210@digraph.polyomino.org.uk> <CAKCAbMgF1PA_5fJKtr-GgKmG=dF4vZWAHiKPKTHj5zN6QuehnA@mail.gmail.com>
On Tue, 16 Jan 2018, Zack Weinberg wrote:
> > --- 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;
>
> This change should probably be applied independently of whether it
> helps hppa (and I don't see any reason to wait, either).
Without the hppa change, it should be a no-op (m68k uses libgcc_s.so.2,
but has its own backtrace.c). So should be harmless, but purely a cleanup
in the absence of the hppa change, with no specific justification for
including it during the freeze.
Logically, there are at least three changes.
1. Make sysdeps/x86_64/backtrace.c use LIBGCC_S_SO.
2. Make hppa use sysdeps/x86_64/backtrace.c (if that helps).
3. Move sysdeps/x86_64/backtrace.c to debug/backtrace.c, remove all the
backtrace.c files that included it (seven right now, potentially hppa if
my patch helps, potentially riscv), and remove all frame.h files as unused
(pure cleanup, should leave installed stripped shared libraries
unchanged).
--
Joseph S. Myers
joseph@codesourcery.com