This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: backtrace for hppa


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]