From efbe665c3a2d344b0d64456cf29499ba53c2965a Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Mon, 11 Jul 2016 09:46:08 +0100 Subject: [AArch64] Fix libc internal asm profiling code When glibc is built with --enable-profile, the ENTRY of asm functions includes CALL_MCOUNT for profiling. (matters for binaries static linked against libc_p.a.) CALL_MCOUNT did not save/restore argument registers around the _mcount call so it clobbered them. (it is enough to only save/restore the arguments passed to a given asm function, but that would be too many asm changes so it is simpler to always save all argument registers in this macro.) float args are not saved: mcount does not clobber the float regs and currently no asm function takes float arguments anyway. [BZ #18707] * sysdeps/aarch64/Makefile (CFLAGS-mcount.c): Add -mgeneral-regs-only. * sysdeps/aarch64/sysdep.h (CALL_MCOUNT): Save argument registers. --- ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 222e4d326d..8e230e9780 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-07-11 Szabolcs Nagy + + [BZ #18707] + * sysdeps/aarch64/Makefile (CFLAGS-mcount.c): Add -mgeneral-regs-only. + * sysdeps/aarch64/sysdep.h (CALL_MCOUNT): Save argument registers. + 2016-07-08 Adhemerval Zanella * sysdeps/unix/sysv/linux/sysdep.h -- cgit v1.2.3