public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 00/11] Unify dynamic loading of the libgcc_s unwinder
@ 2020-02-13 17:08 Florian Weimer
  2020-02-13 17:08 ` [PATCH 09/11] Move sysdeps/gnu/unwind-resume.c to sysdeps/generic/unwind-resume.c Florian Weimer
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: Florian Weimer @ 2020-02-13 17:08 UTC (permalink / raw)
  To: libc-alpha

This series unifies the way glibc loads the libgcc_s unwinder via
internal dlopen.  There are presently four uses:

* The backtrace function.

* Legacy support for unwinder frame registration, which needs
  __frame_state_for.

* GCC unwind personality support (__gcc_personality_v0 _Unwind_Resume)
  for C sources with -fexceptions.  This is needed in libc and
  libpthread.

* The libpthread unwinder, which also needs the canonical frame address
  to properly de-interleave longjump frames.

Only the backtrace function could be ported separately in a
per-architecture fashion.  The last two commits in the series correspond
to the libc part of the personality support, and the libpthread
personality support and the unwinder there.

The S/390 version preserves the backchain fallback for now.

Tested on aarch64-linux-gnu, arm-linux-gnueabi, s390-linux-gnu,
s390x-linux-gnu, i686-linux-gnu, powerpc-linux-gnu, powerpc64-linux-gnu,
powerpc64le-linux-gnu, x86_64-linux-gnu.  Built successfully with
build-many-glibcs.py.

Thanks,
Florian

Florian Weimer (11):
  Implement <unwind-link.h> for dynamically loading the libgcc_s
    unwinder
  backtrace: Implement on top of <unwind-link.h>
  arm: Implement backtrace on top of <unwind-link.h>
  i386: Implement backtrace on top of <unwind-link.h>
  m68k: Implement backtrace on top of <unwind-link.h>
  sparc: Implement backtrace on top <unwind-link.h>
  s390: Implement backtrace on top of <unwind-link.h>
  __frame_state_for: Use <unwind-link.h> for unwinder access
  Move sysdeps/gnu/unwind-resume.c to sysdeps/generic/unwind-resume.c
  Implement _Unwind_Resume in libc on top of <unwind-link.h>
  nptl: Use <unwind-link.h> for accessing the libgcc_s unwinder

 debug/backtrace.c                             |  86 +++-------
 malloc/set-freeres.c                          |   5 +
 misc/Makefile                                 |   2 +-
 misc/Versions                                 |   1 +
 misc/unwind-link.c                            | 149 ++++++++++++++++++
 nptl/nptlfreeres.c                            |   1 -
 nptl/pthreadP.h                               |   6 +-
 nptl/pthread_cancel.c                         |   3 +-
 sysdeps/alpha/arch-unwind-link.h              |  27 ++++
 sysdeps/arm/arch-unwind-link.h                |  38 +++++
 sysdeps/arm/arm-unwind-resume.S               |  26 +--
 sysdeps/arm/backtrace.c                       |  77 +++------
 sysdeps/arm/nptl/unwind-forcedunwind.c        |  25 +++
 sysdeps/arm/pt-arm-unwind-resume.S            |  22 ++-
 sysdeps/arm/unwind-resume.c                   |  25 +++
 sysdeps/generic/arch-unwind-link.h            |  32 ++++
 sysdeps/generic/framestate.c                  |  21 +--
 sysdeps/generic/unwind-link.h                 |  99 ++++++++++++
 sysdeps/generic/unwind-resume.c               |  46 ++++++
 sysdeps/gnu/unwind-resume.c                   |  83 ----------
 sysdeps/i386/arch-unwind-link.h               |  38 +++++
 sysdeps/i386/backtrace.c                      |  82 +++-------
 sysdeps/ia64/arch-unwind-link.h               |  31 ++++
 sysdeps/m68k/arch-unwind-link.h               |  34 ++++
 sysdeps/m68k/backtrace.c                      |  82 +++-------
 sysdeps/m68k/m680x0/arch-unwind-link.h        |  26 +++
 sysdeps/mach/hurd/fork.c                      |   3 +
 sysdeps/mips/arch-unwind-link.h               |  27 ++++
 sysdeps/nptl/fork.c                           |   3 +
 sysdeps/nptl/unwind-forcedunwind.c            | 115 ++------------
 sysdeps/powerpc/powerpc32/arch-unwind-link.h  |  27 ++++
 sysdeps/s390/arch-unwind-link.h               |  27 ++++
 sysdeps/s390/s390-32/backtrace.c              |  45 ++----
 sysdeps/s390/s390-64/backtrace.c              |  46 ++----
 sysdeps/sh/arch-unwind-link.h                 |  27 ++++
 sysdeps/sparc/arch-unwind-link.h              |  27 ++++
 sysdeps/sparc/backtrace.c                     |  66 ++------
 .../sysv/linux/ia64/unwind-forcedunwind.c     |  16 +-
 38 files changed, 899 insertions(+), 597 deletions(-)
 create mode 100644 misc/unwind-link.c
 create mode 100644 sysdeps/alpha/arch-unwind-link.h
 create mode 100644 sysdeps/arm/arch-unwind-link.h
 create mode 100644 sysdeps/arm/nptl/unwind-forcedunwind.c
 create mode 100644 sysdeps/arm/unwind-resume.c
 create mode 100644 sysdeps/generic/arch-unwind-link.h
 create mode 100644 sysdeps/generic/unwind-link.h
 create mode 100644 sysdeps/generic/unwind-resume.c
 delete mode 100644 sysdeps/gnu/unwind-resume.c
 create mode 100644 sysdeps/i386/arch-unwind-link.h
 create mode 100644 sysdeps/ia64/arch-unwind-link.h
 create mode 100644 sysdeps/m68k/arch-unwind-link.h
 create mode 100644 sysdeps/m68k/m680x0/arch-unwind-link.h
 create mode 100644 sysdeps/mips/arch-unwind-link.h
 create mode 100644 sysdeps/powerpc/powerpc32/arch-unwind-link.h
 create mode 100644 sysdeps/s390/arch-unwind-link.h
 create mode 100644 sysdeps/sh/arch-unwind-link.h
 create mode 100644 sysdeps/sparc/arch-unwind-link.h

-- 
2.24.1

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-02-14 11:55 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 17:08 [PATCH 00/11] Unify dynamic loading of the libgcc_s unwinder Florian Weimer
2020-02-13 17:08 ` [PATCH 09/11] Move sysdeps/gnu/unwind-resume.c to sysdeps/generic/unwind-resume.c Florian Weimer
2020-02-13 17:08 ` [PATCH 07/11] s390: Implement backtrace on top of <unwind-link.h> Florian Weimer
2020-02-14 11:55   ` Stefan Liebler
2020-02-13 17:08 ` [PATCH 08/11] __frame_state_for: Use <unwind-link.h> for unwinder access Florian Weimer
2020-02-13 17:08 ` [PATCH 10/11] Implement _Unwind_Resume in libc on top of <unwind-link.h> Florian Weimer
2020-02-13 17:08 ` [PATCH 01/11] Implement <unwind-link.h> for dynamically loading the libgcc_s unwinder Florian Weimer
2020-02-13 17:08 ` [PATCH 11/11] nptl: Use <unwind-link.h> for accessing " Florian Weimer
2020-02-13 17:08 ` [PATCH 02/11] backtrace: Implement on top of <unwind-link.h> Florian Weimer
2020-02-13 17:08 ` [PATCH 04/11] i386: Implement backtrace " Florian Weimer
2020-02-13 17:08 ` [PATCH 06/11] sparc: Implement backtrace on top <unwind-link.h> Florian Weimer
2020-02-13 17:08 ` [PATCH 03/11] arm: Implement backtrace on top of <unwind-link.h> Florian Weimer
2020-02-13 17:08 ` [PATCH 05/11] m68k: " Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).