glibc/sysdeps
Stefan Liebler 8beba15d53 S390: Add cfi information for start routines in order to stop unwinding.
GDB failed to detect the outermost frame while showing the backtrace
within a thread:
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Before this patch, the start routines like thread_start had no cfi information.
GDB is then using the prologue unwinder if no cfi information is available.
This unwinder tries to unwind r15 and stops e.g. if r15 was updated or
on some jump-instructions.

On older glibc-versions (before commit "Remove cached PID/TID in clone"
c579f48edb), the thread_start function used
such a jump-instruction and GDB did not fail with an error.

This patch adds cfi information for _start, thread_start and __makecontext_ret
and marks r14 as undefined which marks the frame as outermost frame and GDB
stops the backtrace. Also tested different gcc versions in order to test
_Unwind_Backtrace() in libgcc as this is used by backtrace() in glibc.

ChangeLog:

	* sysdeps/s390/s390-64/start.S (_start): Add cfi information for r14.
	* sysdeps/s390/s390-32/start.S: (_start): Likewise
	* sysdeps/unix/sysv/linux/s390/s390-64/clone.S
	(thread_start): Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/clone.S
	(thread_start): Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/__makecontext_ret.S
	(__makecontext_ret): Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/__makecontext_ret.S
	(__makecontext_ret): Likewise.
2017-11-21 08:45:28 +01:00
..
aarch64 aarch64: Optimized memset for falkor 2017-11-20 18:25:04 +05:30
alpha nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION} 2017-11-07 09:48:41 -02:00
arm Prefer https for Sourceware links 2017-11-16 11:49:26 +05:30
generic ld.so: Add architecture specific fields 2017-11-13 08:02:52 -08:00
gnu The -Wstringop-truncation option new in GCC 8 detects common misuses 2017-11-15 17:39:59 -07:00
hppa Fix clog10_downward ulps on hppa. 2017-11-11 12:12:28 -05:00
i386 Use libm_alias_ldouble in sysdeps/i386/fpu. 2017-11-17 22:54:39 +00:00
ia64 Support bits/floatn.h inclusion from .S files. 2017-11-17 22:01:43 +00:00
ieee754 Support bits/floatn.h inclusion from .S files. 2017-11-17 22:01:43 +00:00
init_array
m68k nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION} 2017-11-07 09:48:41 -02:00
mach Introduce NO_RTLD_HIDDEN, make hurd use it instead of NO_HIDDEN 2017-10-03 01:33:38 +02:00
microblaze nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION} 2017-11-07 09:48:41 -02:00
mips Support bits/floatn.h inclusion from .S files. 2017-11-17 22:01:43 +00:00
nios2 nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION} 2017-11-07 09:48:41 -02:00
nptl nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION} 2017-11-07 09:48:41 -02:00
posix Cleanup sigpause implementation 2017-11-15 15:45:39 -02:00
powerpc powerpc: Update AT_HWCAP2 bits 2017-11-17 21:49:02 -02:00
pthread
s390 S390: Add cfi information for start routines in order to stop unwinding. 2017-11-21 08:45:28 +01:00
sh nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION} 2017-11-07 09:48:41 -02:00
sparc nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION} 2017-11-07 09:48:41 -02:00
tile nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION} 2017-11-07 09:48:41 -02:00
unix S390: Add cfi information for start routines in order to stop unwinding. 2017-11-21 08:45:28 +01:00
wordsize-32
wordsize-64 posix: Consolidate Linux glob implementation 2017-09-08 16:34:02 +02:00
x86 Support bits/floatn.h inclusion from .S files. 2017-11-17 22:01:43 +00:00
x86_64 Use libm_alias_ldouble in sysdeps/x86_64/fpu. 2017-11-17 23:39:11 +00:00