diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-10-19 08:40:39 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-10-19 08:40:49 -0700 |
commit | 4401ec26af6b6fd0b2c1f2bd2f54ee41479cf3f9 (patch) | |
tree | 934beaf5df2a4684aa7a8f9cae15dfddbfdd6a0f | |
parent | d990d79610362f823292f9d869b84b4ec4491159 (diff) | |
download | glibc-4401ec26af6b6fd0b2c1f2bd2f54ee41479cf3f9.tar.gz glibc-4401ec26af6b6fd0b2c1f2bd2f54ee41479cf3f9.tar.xz glibc-4401ec26af6b6fd0b2c1f2bd2f54ee41479cf3f9.zip |
X86-64: Correct CFA in _dl_runtime_resolve
When stack is re-aligned in _dl_runtime_resolve, there is no need to adjust CFA when allocating register save area on stack. * sysdeps/x86_64/dl-trampoline.h (_dl_runtime_resolve): Don't adjust CFA when allocating register save area on re-aligned stack. (cherry picked from commit 0ac8ee53e8efbfd6e1c37094b4653f5c2dad65b5)
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | sysdeps/x86_64/dl-trampoline.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 5528a5752b..697bffd99e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2017-10-19 H.J. Lu <hongjiu.lu@intel.com> + + * sysdeps/x86_64/dl-trampoline.h (_dl_runtime_resolve): Don't + adjust CFA when allocating register save area on re-aligned + stack. + 2017-06-14 Florian Weimer <fweimer@redhat.com> * sysdeps/i386/i686/multiarch/strcspn-c.c: Add IS_IN (libc) guard. diff --git a/sysdeps/x86_64/dl-trampoline.h b/sysdeps/x86_64/dl-trampoline.h index b90836ab13..8161f96b94 100644 --- a/sysdeps/x86_64/dl-trampoline.h +++ b/sysdeps/x86_64/dl-trampoline.h @@ -69,7 +69,9 @@ _dl_runtime_resolve: and $-VEC_SIZE, %RSP_LP #endif sub $REGISTER_SAVE_AREA, %RSP_LP +#if !DL_RUNTIME_RESOLVE_REALIGN_STACK cfi_adjust_cfa_offset(REGISTER_SAVE_AREA) +#endif # Preserve registers otherwise clobbered. movq %rax, REGISTER_SAVE_RAX(%rsp) movq %rcx, REGISTER_SAVE_RCX(%rsp) |