diff options
author | Ulrich Weigand <Ulrich.Weigand@de.ibm.com> | 2013-12-04 06:55:03 -0600 |
---|---|---|
committer | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2013-12-04 07:41:39 -0600 |
commit | 8b8a692cfd7d80f1ee7c8b9ab356a259367dd187 (patch) | |
tree | 7740d5d71feed939fb59df34e1f3535fb14e990f /ChangeLog | |
parent | 122b66defdb9e4ded3ccc5c2b290f0520c6fa3cd (diff) | |
download | glibc-8b8a692cfd7d80f1ee7c8b9ab356a259367dd187.tar.gz glibc-8b8a692cfd7d80f1ee7c8b9ab356a259367dd187.tar.xz glibc-8b8a692cfd7d80f1ee7c8b9ab356a259367dd187.zip |
PowerPC64 ELFv2 ABI 4/6: Stack frame layout changes
This updates glibc for the changes in the ELFv2 relating to the stack frame layout. These are described in more detail here: http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01149.html http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01146.html Specifically, the "compiler and linker doublewords" were removed, which has the effect that the save slot for the TOC register is now at offset 24 rather than 40 to the stack pointer. In addition, a function may now no longer necessarily assume that its caller has set up a 64-byte register save area its use. To address the first change, the patch goes through all assembler files and replaces immediate offsets in instructions accessing the ABI-defined stack slots by symbolic offsets. Those already were defined in ucontext_i.sym and used in some of the context routines, but that doesn't really seem like the right place for those defines. The patch instead defines those symbolic offsets in sysdeps.h, in two variants for the old and new ABI, and uses them systematically in all assembler files, not just the context routines. The second change only affected a few assembler files that used the save area to temporarily store some registers. In those cases where this happens within a leaf function, this patch changes the code to store those registers to the "red zone" below the stack pointer. Otherwise, the functions already allocate a stack frame, and the patch changes them to add extra space in these frames as temporary space for the ELFv2 ABI.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 668fe03d2b..0be780a3c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,54 @@ 2013-12-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> + + * sysdeps/powerpc/powerpc64/sysdep.h (FRAME_MIN_SIZE): Define. + (FRAME_MIN_SIZE_PARM): Likewise. + (FRAME_BACKCHAIN): Likewise. + (FRAME_CR_SAVE): Likewise. + (FRAME_LR_SAVE): Likewise. + (FRAME_TOC_SAVE): Likewise. + (FRAME_PARM_SAVE): Likewise. + (FRAME_PARM1_SAVE, FRAME_PARM2_SAVE, FRAME_PARM3_SAVE, + FRAME_PARM4_SAVE, FRAME_PARM5_SAVE, FRAME_PARM6_SAVE, + FRAME_PARM7_SAVE, FRAME_PARM8_SAVE, FRAME_PARM9_SAVE): Likewise. + (call_mcount_parm_offset): New macro. + (SAVE_ARG, REST_ARG, CFI_SAVE_ARG): Use it. + (PROF): Use symbolic stack frame offsets. + (TAIL_CALL_SYSCALL_ERROR): Likewise. + * sysdeps/powerpc/powerpc64/dl-trampoline.S (FRAME_SIZE, INT_PARMS): + Redefine in terms of FRAME_MIN_SIZE. + (_dl_runtime_resolve): Use symbolic stack frame offsets. + (_dl_profile_resolve): Likewise. Update comment. + * sysdeps/powerpc/powerpc64/setjmp-common.S (__GI__setjmp): Use + symbols stack frame offsets. + (__sigsetjmp): Likewise. + * sysdeps/powerpc/powerpc64/__longjmp-common.S (__longjmp): Likewise. + * sysdeps/powerpc/powerpc64/ppc-mcount.S (_mcount): Likewise. + * sysdeps/powerpc/powerpc64/crti.S (_init, _fini): Likewise. + * sysdeps/powerpc/powerpc64/crtn.S (_init, _fini): Likewise. + + * sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.sym + (FRAME_BACKCHAIN): Remove. + (FRAME_CR_SAVE): Likewise. + (FRAME_LR_SAVE): Likewise. + (FRAME_COMPILER_DW): Likewise. + (FRAME_LINKER_DW): Likewise. + (FRAME_TOC_SAVE): Likewise. + (FRAME_PARM_SAVE): Likewise. + (FRAME_PARM1_SAVE, FRAME_PARM2_SAVE, FRAME_PARM3_SAVE, + FRAME_PARM4_SAVE, FRAME_PARM5_SAVE, FRAME_PARM6_SAVE, + FRAME_PARM7_SAVE, FRAME_PARM8_SAVE, FRAME_PARM9_SAVE): Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/____longjmp_chk.S + (CHECK_SP): Use symbolic stack frame offsets. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S (__brk): Use "red + zone" instead of caller's parameter save area for temp storage. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S (__clone): + Likewise. Also, use symbolic stack frame offsets. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S (FRAMESIZE, + stackblock): Redefine for _CALL_ELF == 2 to save parameters into + our own stack frame instead of the caller's. + (__socket): Use symbolic stack frame offsets. + +2013-12-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Alan Modra <amodra@gmail.com> * elf/elf.h (DT_PPC64_OPT, PPC64_OPT_TLS, PPC64_OPT_MULTI_TOC): |