aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2003-06-15 19:40:29 +0000
committerAndreas Jaeger <aj@suse.de>2003-06-15 19:40:29 +0000
commit2b4500480e460c344b8def37c716328bf3b1d970 (patch)
tree5c5fdf39ef4b143d0acb800cbd46d7b2ef7864fb
parent05c49e6f55dcae94f67c3d3d3de44fcc7ad5f699 (diff)
downloadglibc-2b4500480e460c344b8def37c716328bf3b1d970.tar
glibc-2b4500480e460c344b8def37c716328bf3b1d970.tar.gz
glibc-2b4500480e460c344b8def37c716328bf3b1d970.tar.bz2
glibc-2b4500480e460c344b8def37c716328bf3b1d970.zip
* sysdeps/x86_64/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE):
Add CFI directives.
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/x86_64/dl-machine.h33
2 files changed, 23 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 191e785fb3..6a3da15ad0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-15 Andreas Jaeger <aj@suse.de>
+
+ * sysdeps/x86_64/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE):
+ Add CFI directives.
+
2003-06-15 Guido Guenther <agx@sigxcpu.org>
* sysdeps/unix/sysv/linux/mips/Makefile: Add missing endif and
diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h
index 964a4b422b..8017c51677 100644
--- a/sysdeps/x86_64/dl-machine.h
+++ b/sysdeps/x86_64/dl-machine.h
@@ -217,13 +217,15 @@ _dl_runtime_profile:\n\
" CFI_STARTPROC "\n\
_dl_runtime_resolve:\n\
_dl_runtime_profile:\n\
- pushq %rax # Preserve registers otherwise clobbered.\n\
- pushq %rcx\n\
- pushq %rdx\n\
- pushq %rsi\n\
- pushq %rdi\n\
- pushq %r8\n\
- pushq %r9\n\
+ subq $56,%rsp\n\
+ " CFI_ADJUST_CFA_OFFSET(72)" # Incorporate PLT\n\
+ movq %rax,(%rsp) # Preserve registers otherwise clobbered.\n\
+ movq %rcx,8(%rsp)\n\
+ movq %rdx,16(%rsp)\n\
+ movq %rsi,24(%rsp)\n\
+ movq %rdi,32(%rsp)\n\
+ movq %r8,40(%rsp)\n\
+ movq %r9,48(%rsp)\n\
movq 64(%rsp), %rsi # Copy args pushed by PLT in register.\n\
movq %rsi,%r11 # Multiply by 24\n\
addq %r11,%rsi\n\
@@ -232,14 +234,15 @@ _dl_runtime_profile:\n\
movq 56(%rsp), %rdi # %rdi: link_map, %rsi: reloc_offset\n\
call fixup # Call resolver.\n\
movq %rax, %r11 # Save return value\n\
- popq %r9 # Get register content back.\n\
- popq %r8\n\
- popq %rdi\n\
- popq %rsi\n\
- popq %rdx\n\
- popq %rcx\n\
- popq %rax\n\
- addq $16,%rsp # Adjust stack\n\
+ movq 48(%rsp),%r9 # Get register content back.\n\
+ movq 40(%rsp),%r8\n\
+ movq 32(%rsp),%rdi\n\
+ movq 24(%rsp),%rsi\n\
+ movq 16(%rsp),%rdx\n\
+ movq 8(%rsp),%rcx\n\
+ movq (%rsp),%rax\n\
+ addq $72,%rsp # Adjust stack\n\
+ " CFI_ADJUST_CFA_OFFSET(-72)"\n\
jmp *%r11 # Jump to function address.\n\
" CFI_ENDPROC "\n\
.size _dl_runtime_resolve, .-_dl_runtime_resolve\n\