1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

PowerPC: fix backtrace to handle signal trampolines

This patch fixes backtrace for PPC32 and PPC64 to correctly handle
signal trampolines. The 'debug/tst-backtrace6.c' also check for
SA_SIGINFO handling, where is triggers another vDSO symbols for PPC32.
This commit is contained in:
Adhemerval Zanella
2013-08-20 15:01:59 -05:00
parent c980f2f4fe
commit d400dcac5e
8 changed files with 172 additions and 6 deletions

View File

@ -29,6 +29,12 @@ void *__vdso_clock_getres;
void *__vdso_get_tbfreq;
void *__vdso_getcpu;
void *__vdso_time;
#if defined(__PPC64__) || defined(__powerpc64__)
void *__vdso_sigtramp_rt64;
#else
void *__vdso_sigtramp32;
void *__vdso_sigtramp_rt32;
#endif
static inline void
_libc_vdso_platform_setup (void)
@ -46,6 +52,16 @@ _libc_vdso_platform_setup (void)
__vdso_getcpu = _dl_vdso_vsym ("__kernel_getcpu", &linux2615);
__vdso_time = _dl_vdso_vsym ("__kernel_time", &linux2615);
/* PPC64 uses only one signal trampoline symbol, while PPC32 will use
two depending if SA_SIGINFO is used (__kernel_sigtramp_rt32) or not
(__kernel_sigtramp32). */
#if defined(__PPC64__) || defined(__powerpc64__)
__vdso_sigtramp_rt64 = _dl_vdso_vsym ("__kernel_sigtramp_rt64", &linux2615);
#else
__vdso_sigtramp32 = _dl_vdso_vsym ("__kernel_sigtramp32", &linux2615);
__vdso_sigtramp_rt32 = _dl_vdso_vsym ("__kernel_sigtramp_rt32", &linux2615);
#endif
}
# define VDSO_SETUP _libc_vdso_platform_setup