aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/x86_64/dl-tlsdesc.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/x86_64/dl-tlsdesc.S')
-rw-r--r--sysdeps/x86_64/dl-tlsdesc.S13
1 files changed, 7 insertions, 6 deletions
diff --git a/sysdeps/x86_64/dl-tlsdesc.S b/sysdeps/x86_64/dl-tlsdesc.S
index 3cb7c3d031..777f30beab 100644
--- a/sysdeps/x86_64/dl-tlsdesc.S
+++ b/sysdeps/x86_64/dl-tlsdesc.S
@@ -163,14 +163,15 @@ _dl_tlsdesc_dynamic:
/* The PLT entry will have pushed the link_map pointer. */
_dl_tlsdesc_resolve_rela:
cfi_adjust_cfa_offset (8)
- /* Save all call-clobbered registers. */
- subq $72, %rsp
- cfi_adjust_cfa_offset (72)
+ /* Save all call-clobbered registers. Add 8 bytes for push in
+ the PLT entry to align the stack. */
+ subq $80, %rsp
+ cfi_adjust_cfa_offset (80)
movq %rax, (%rsp)
movq %rdi, 8(%rsp)
movq %rax, %rdi /* Pass tlsdesc* in %rdi. */
movq %rsi, 16(%rsp)
- movq 72(%rsp), %rsi /* Pass link_map* in %rsi. */
+ movq 80(%rsp), %rsi /* Pass link_map* in %rsi. */
movq %r8, 24(%rsp)
movq %r9, 32(%rsp)
movq %r10, 40(%rsp)
@@ -187,8 +188,8 @@ _dl_tlsdesc_resolve_rela:
movq 48(%rsp), %r11
movq 56(%rsp), %rdx
movq 64(%rsp), %rcx
- addq $80, %rsp
- cfi_adjust_cfa_offset (-80)
+ addq $88, %rsp
+ cfi_adjust_cfa_offset (-88)
jmp *(%rax)
cfi_endproc
.size _dl_tlsdesc_resolve_rela, .-_dl_tlsdesc_resolve_rela