crosstool-ng/patches/glibc/2.1.3/glibc-2.1.3-allow-gcc3-dl-machine-i386.patch
Yann E. MORIN" 1906cf93f8 Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
2007-02-24 11:00:05 +00:00

172 lines
5.4 KiB
Diff

* sysdeps/i386/dl-machine.h (RTLD_START): Don't use multi-line
strings.
(ELF_MACHINE_RUNTIME_TRAMPOLINE): Likewise.
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/dl-machine.h.diff?r1=1.82&r2=1.83&cvsroot=glibc&hideattic=0
backported a bit
--- glibc-2.1.3/sysdeps/i386/dl-machine.h.old 1999-02-20 10:19:47.000000000 -0800
+++ glibc-2.1.3/sysdeps/i386/dl-machine.h 2004-03-05 15:56:25.000000000 -0800
@@ -124,68 +124,68 @@
and then redirect to the address it returns. */
#ifndef PROF
# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
- .text
- .globl _dl_runtime_resolve
- .type _dl_runtime_resolve, @function
- .align 16
-_dl_runtime_resolve:
- pushl %eax # Preserve registers otherwise clobbered.
- pushl %ecx
- pushl %edx
- movl 16(%esp), %edx # Copy args pushed by PLT in register. Note
- movl 12(%esp), %eax # that `fixup' takes its parameters in regs.
- call fixup # Call resolver.
- popl %edx # Get register content back.
- popl %ecx
- xchgl %eax, (%esp) # Get %eax contents end store function address.
- ret $8 # Jump to function address.
- .size _dl_runtime_resolve, .-_dl_runtime_resolve
-
- .globl _dl_runtime_profile
- .type _dl_runtime_profile, @function
- .align 16
-_dl_runtime_profile:
- pushl %eax # Preserve registers otherwise clobbered.
- pushl %ecx
- pushl %edx
- movl 20(%esp), %ecx # Load return address
- movl 16(%esp), %edx # Copy args pushed by PLT in register. Note
- movl 12(%esp), %eax # that `fixup' takes its parameters in regs.
- call profile_fixup # Call resolver.
- popl %edx # Get register content back.
- popl %ecx
- xchgl %eax, (%esp) # Get %eax contents end store function address.
- ret $8 # Jump to function address.
- .size _dl_runtime_profile, .-_dl_runtime_profile
- .previous
+ .text\n\
+ .globl _dl_runtime_resolve\n\
+ .type _dl_runtime_resolve, @function\n\
+ .align 16\n\
+_dl_runtime_resolve:\n\
+ pushl %eax # Preserve registers otherwise clobbered.\n\
+ pushl %ecx\n\
+ pushl %edx\n\
+ movl 16(%esp), %edx # Copy args pushed by PLT in register. Note\n\
+ movl 12(%esp), %eax # that `fixup' takes its parameters in regs.\n\
+ call fixup # Call resolver.\n\
+ popl %edx # Get register content back.\n\
+ popl %ecx\n\
+ xchgl %eax, (%esp) # Get %eax contents end store function address.\n\
+ ret $8 # Jump to function address.\n\
+ .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
+\n\
+ .globl _dl_runtime_profile\n\
+ .type _dl_runtime_profile, @function\n\
+ .align 16\n\
+_dl_runtime_profile:\n\
+ pushl %eax # Preserve registers otherwise clobbered.\n\
+ pushl %ecx\n\
+ pushl %edx\n\
+ movl 20(%esp), %ecx # Load return address\n\
+ movl 16(%esp), %edx # Copy args pushed by PLT in register. Note\n\
+ movl 12(%esp), %eax # that `fixup' takes its parameters in regs.\n\
+ call profile_fixup # Call resolver.\n\
+ popl %edx # Get register content back.\n\
+ popl %ecx\n\
+ xchgl %eax, (%esp) # Get %eax contents end store function address.\n\
+ ret $8 # Jump to function address.\n\
+ .size _dl_runtime_profile, .-_dl_runtime_profile\n\
+ .previous\n\
");
#else
-# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
- .text
- .globl _dl_runtime_resolve
- .globl _dl_runtime_profile
- .type _dl_runtime_resolve, @function
- .type _dl_runtime_profile, @function
- .align 16
-_dl_runtime_resolve:
-_dl_runtime_profile:
- pushl %eax # Preserve registers otherwise clobbered.
- pushl %ecx
- pushl %edx
- movl 16(%esp), %edx # Push the arguments for `fixup'
- movl 12(%esp), %eax
- pushl %edx
- pushl %eax
- call fixup # Call resolver.
- popl %edx # Pop the parameters
- popl %ecx
- popl %edx # Get register content back.
- popl %ecx
- xchgl %eax, (%esp) # Get %eax contents end store function address.
- ret $8 # Jump to function address.
- .size _dl_runtime_resolve, .-_dl_runtime_resolve
- .size _dl_runtime_profile, .-_dl_runtime_profile
- .previous
+# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\n\
+ .text\n\
+ .globl _dl_runtime_resolve\n\
+ .globl _dl_runtime_profile\n\
+ .type _dl_runtime_resolve, @function\n\
+ .type _dl_runtime_profile, @function\n\
+ .align 16\n\
+_dl_runtime_resolve:\n\
+_dl_runtime_profile:\n\
+ pushl %eax # Preserve registers otherwise clobbered.\n\
+ pushl %ecx\n\
+ pushl %edx\n\
+ movl 16(%esp), %edx # Push the arguments for `fixup'\n\
+ movl 12(%esp), %eax\n\
+ pushl %edx\n\
+ pushl %eax\n\
+ call fixup # Call resolver.\n\
+ popl %edx # Pop the parameters\n\
+ popl %ecx\n\
+ popl %edx # Get register content back.\n\
+ popl %ecx\n\
+ xchgl %eax, (%esp) # Get %eax contents end store function address.\n\
+ ret $8 # Jump to function address.\n\
+ .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
+ .size _dl_runtime_profile, .-_dl_runtime_profile\n\
+ .previous\n\
");
#endif
@@ -197,10 +197,10 @@
The C function `_dl_start' is the real entry point;
its return value is the user program's entry point. */
-#define RTLD_START asm ("\
-.text\n\
-.globl _start\n\
-.globl _dl_start_user\n\
+#define RTLD_START asm ("\n\
+ .text\n\
+ .globl _start\n\
+ .globl _dl_start_user\n\
_start:\n\
pushl %esp\n\
call _dl_start\n\
@@ -208,7 +208,7 @@
_dl_start_user:\n\
# Save the user entry point address in %edi.\n\
movl %eax, %edi\n\
- # Point %ebx at the GOT.
+ # Point %ebx at the GOT.\n\
call 0f\n\
0: popl %ebx\n\
addl $_GLOBAL_OFFSET_TABLE_+[.-0b], %ebx\n\
@@ -255,7 +255,7 @@
movl _dl_fini@GOT(%ebx), %edx\n\
# Jump to the user's entry point.\n\
jmp *%edi\n\
-.previous\n\
+ .previous\n\
");
/* Nonzero iff TYPE should not be allowed to resolve to one of