Okay, I finally managed to get the makefiles right.
This patch will include only the code in unwind-forcedunwind,
originally used by libpthread. Since the effects are pretty much the
same, that works just right. This is even more harmless given the
fact that none of the current libc/librt code requires exception
handling as in glibc (i.e. no call to any unwinder's function is
generated by GCC). As this could change in the future, it's good to
have an implementation that will work already there.
Apart from the fact that the actual implementation of _Unwind_Resume
for ARM was not working properly, the symbols for this and other
unwinder's functions was overriding the ones in libgcc_s. The code in
glibc doesn't explicitly set the hidden attribute on all these
functions, but it eventually uses a version script which makes all
these locals. Here, I explicitly set these functions to be hidden,
thus avoiding the need to use a version script.
Ignacy Gawędzki (1):
libpthread: Fix inclusion of unwind code.
libpthread/nptl/sysdeps/Makefile.commonarch | 1 +
libpthread/nptl/sysdeps/arm/arm-unwind-resume.c | 67 ++++++++
libpthread/nptl/sysdeps/arm/pt-arm-unwind-resume.c | 2 +
libpthread/nptl/sysdeps/arm/rt-arm-unwind-resume.c | 1 +
libpthread/nptl/sysdeps/arm/unwind-resume.h | 33 ++++
libpthread/nptl/sysdeps/generic/unwind-resume.c | 75 +++++++++
libpthread/nptl/sysdeps/generic/unwind-resume.h | 33 ++++
.../nptl/sysdeps/pthread/unwind-forcedunwind.c | 49 +++---
libpthread/nptl/sysdeps/pthread/unwind-resume.c | 80 ----------
.../unix/sysv/linux/arm/unwind-forcedunwind.c | 177 ---------------------
.../sysdeps/unix/sysv/linux/arm/unwind-resume.c | 116 --------------
11 files changed, 230 insertions(+), 404 deletions(-)
create mode 100644 libpthread/nptl/sysdeps/arm/arm-unwind-resume.c
create mode 100644 libpthread/nptl/sysdeps/arm/pt-arm-unwind-resume.c
create mode 100644 libpthread/nptl/sysdeps/arm/rt-arm-unwind-resume.c
create mode 100644 libpthread/nptl/sysdeps/arm/unwind-resume.h
create mode 100644 libpthread/nptl/sysdeps/generic/unwind-resume.c
create mode 100644 libpthread/nptl/sysdeps/generic/unwind-resume.h
delete mode 100644 libpthread/nptl/sysdeps/pthread/unwind-resume.c
delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c
--
2.7.4