r1251 - in trunk/glibc-2.3-head/patches: . hacks
Author: rmh
Date: 2006-02-26 21:58:23 +0000 (Sun, 26 Feb 2006)
New Revision: 1251
Added:
trunk/glibc-2.3-head/patches/hacks/
trunk/glibc-2.3-head/patches/hacks/amd64_segfault.diff
Log:
Add amd64_segfault.diff (patch from Petr).
Added: trunk/glibc-2.3-head/patches/hacks/amd64_segfault.diff
===================================================================
--- trunk/glibc-2.3-head/patches/hacks/amd64_segfault.diff 2006-02-25 14:44:01 UTC (rev 1250)
+++ trunk/glibc-2.3-head/patches/hacks/amd64_segfault.diff 2006-02-26 21:58:23 UTC (rev 1251)
@@ -0,0 +1,35 @@
+
+Author: petr
+Status: do not submit!! petr said he would make a proper version
+
+diff -ur glibc-2.3.6.old/sysdeps/x86_64/dl-machine.h glibc-2.3.6/sysdeps/x86_64/dl-machine.h
+--- glibc-2.3.6.old/sysdeps/x86_64/dl-machine.h Wed Feb 16 10:58:02 2005
++++ glibc-2.3.6/sysdeps/x86_64/dl-machine.h Sun Feb 26 20:21:19 2006
+@@ -261,7 +261,7 @@
+ .globl _start\n\
+ .globl _dl_start_user\n\
+ _start:\n\
+- movq %rsp, %rdi\n\
++ movq %rdi, %rsp\n\
+ call _dl_start\n\
+ _dl_start_user:\n\
+ # Save the user entry point address in %r12.\n\
+@@ -298,6 +298,7 @@
+ leaq _dl_fini(%rip), %rdx\n\
+ # And make sure %rsp points to argc stored on the stack.\n\
+ movq %r13, %rsp\n\
++ movq %rsp, %rdi\n\
+ # Jump to the user's entry point.\n\
+ jmp *%r12\n\
+ .previous\n\
+diff -ur glibc-2.3.6.old/sysdeps/x86_64/elf/start.S glibc-2.3.6/sysdeps/x86_64/elf/start.S
+--- glibc-2.3.6.old/sysdeps/x86_64/elf/start.S Sun Feb 26 20:16:37 2006
++++ glibc-2.3.6/sysdeps/x86_64/elf/start.S Sun Feb 26 20:20:48 2006
+@@ -80,6 +80,7 @@
+
+ movq %rdx, %r9 /* Address of the shared library termination
+ function. */
++ movq %rdi, %rsp
+ popq %rsi /* Pop the argument count. */
+ movq %rsp, %rdx /* argv starts just at the current stack top. */
+ /* Align the stack to a 16 byte boundary to follow the ABI. */
Reply to: