]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
X86-64: Correct CFA in _dl_runtime_resolve
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 19 Oct 2017 15:50:07 +0000 (08:50 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 19 Oct 2017 15:50:28 +0000 (08:50 -0700)
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)

ChangeLog
sysdeps/x86_64/dl-trampoline.h

index 79e3eb2e536d5cb8d641fbb0a2d4784aadecc4e7..e61f956ef6ec1a0fa98fd5c7ace265f85f5b291c 100644 (file)
--- 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.
+
 2016-12-21  Joseph Myers  <joseph@codesourcery.com>
 
        [BZ #20978]
index 32ad3af2027073ed8699b6a91530b2060101da17..d21c5a987a91302631b2b12987ed833c557064c8 100644 (file)
@@ -169,7 +169,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)