]> 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:40:39 +0000 (08:40 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 19 Oct 2017 15:40:49 +0000 (08:40 -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 5528a5752b7b44bebc93586da0f76060262c0ac1..697bffd99e618acbce891941ee628afbe64b2caa 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.
+
 2017-06-14  Florian Weimer  <fweimer@redhat.com>
 
        * sysdeps/i386/i686/multiarch/strcspn-c.c: Add IS_IN (libc) guard.
index b90836ab137faf13266c641cf34cbd4f087687bb..8161f96b94d04b153e4fd49bca2f436b4a32f1a8 100644 (file)
@@ -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)