patches/glibc/2.1.3/glibc-2.1.3-allow-gcc3-dl-machine-i386.patch
changeset 1 eeea35fbf182
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/glibc/2.1.3/glibc-2.1.3-allow-gcc3-dl-machine-i386.patch	Sat Feb 24 11:00:05 2007 +0000
     1.3 @@ -0,0 +1,171 @@
     1.4 +	* sysdeps/i386/dl-machine.h (RTLD_START): Don't use multi-line
     1.5 +	strings.
     1.6 +	(ELF_MACHINE_RUNTIME_TRAMPOLINE): Likewise.
     1.7 +
     1.8 +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
     1.9 +backported a bit
    1.10 +
    1.11 +--- glibc-2.1.3/sysdeps/i386/dl-machine.h.old	1999-02-20 10:19:47.000000000 -0800
    1.12 ++++ glibc-2.1.3/sysdeps/i386/dl-machine.h	2004-03-05 15:56:25.000000000 -0800
    1.13 +@@ -124,68 +124,68 @@
    1.14 +    and then redirect to the address it returns.  */
    1.15 + #ifndef PROF
    1.16 + # define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
    1.17 +-	.text
    1.18 +-	.globl _dl_runtime_resolve
    1.19 +-	.type _dl_runtime_resolve, @function
    1.20 +-	.align 16
    1.21 +-_dl_runtime_resolve:
    1.22 +-	pushl %eax		# Preserve registers otherwise clobbered.
    1.23 +-	pushl %ecx
    1.24 +-	pushl %edx
    1.25 +-	movl 16(%esp), %edx	# Copy args pushed by PLT in register.  Note
    1.26 +-	movl 12(%esp), %eax	# that `fixup' takes its parameters in regs.
    1.27 +-	call fixup		# Call resolver.
    1.28 +-	popl %edx		# Get register content back.
    1.29 +-	popl %ecx
    1.30 +-	xchgl %eax, (%esp)	# Get %eax contents end store function address.
    1.31 +-	ret $8			# Jump to function address.
    1.32 +-	.size _dl_runtime_resolve, .-_dl_runtime_resolve
    1.33 +-
    1.34 +-	.globl _dl_runtime_profile
    1.35 +-	.type _dl_runtime_profile, @function
    1.36 +-	.align 16
    1.37 +-_dl_runtime_profile:
    1.38 +-	pushl %eax		# Preserve registers otherwise clobbered.
    1.39 +-	pushl %ecx
    1.40 +-	pushl %edx
    1.41 +-	movl 20(%esp), %ecx	# Load return address
    1.42 +-	movl 16(%esp), %edx	# Copy args pushed by PLT in register.  Note
    1.43 +-	movl 12(%esp), %eax	# that `fixup' takes its parameters in regs.
    1.44 +-	call profile_fixup	# Call resolver.
    1.45 +-	popl %edx		# Get register content back.
    1.46 +-	popl %ecx
    1.47 +-	xchgl %eax, (%esp)	# Get %eax contents end store function address.
    1.48 +-	ret $8			# Jump to function address.
    1.49 +-	.size _dl_runtime_profile, .-_dl_runtime_profile
    1.50 +-	.previous
    1.51 ++	.text\n\
    1.52 ++	.globl _dl_runtime_resolve\n\
    1.53 ++	.type _dl_runtime_resolve, @function\n\
    1.54 ++	.align 16\n\
    1.55 ++_dl_runtime_resolve:\n\
    1.56 ++	pushl %eax		# Preserve registers otherwise clobbered.\n\
    1.57 ++	pushl %ecx\n\
    1.58 ++	pushl %edx\n\
    1.59 ++	movl 16(%esp), %edx	# Copy args pushed by PLT in register.  Note\n\
    1.60 ++	movl 12(%esp), %eax	# that `fixup' takes its parameters in regs.\n\
    1.61 ++	call fixup		# Call resolver.\n\
    1.62 ++	popl %edx		# Get register content back.\n\
    1.63 ++	popl %ecx\n\
    1.64 ++	xchgl %eax, (%esp)	# Get %eax contents end store function address.\n\
    1.65 ++	ret $8			# Jump to function address.\n\
    1.66 ++	.size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
    1.67 ++\n\
    1.68 ++	.globl _dl_runtime_profile\n\
    1.69 ++	.type _dl_runtime_profile, @function\n\
    1.70 ++	.align 16\n\
    1.71 ++_dl_runtime_profile:\n\
    1.72 ++	pushl %eax		# Preserve registers otherwise clobbered.\n\
    1.73 ++	pushl %ecx\n\
    1.74 ++	pushl %edx\n\
    1.75 ++	movl 20(%esp), %ecx	# Load return address\n\
    1.76 ++	movl 16(%esp), %edx	# Copy args pushed by PLT in register.  Note\n\
    1.77 ++	movl 12(%esp), %eax	# that `fixup' takes its parameters in regs.\n\
    1.78 ++	call profile_fixup	# Call resolver.\n\
    1.79 ++	popl %edx		# Get register content back.\n\
    1.80 ++	popl %ecx\n\
    1.81 ++	xchgl %eax, (%esp)	# Get %eax contents end store function address.\n\
    1.82 ++	ret $8			# Jump to function address.\n\
    1.83 ++	.size _dl_runtime_profile, .-_dl_runtime_profile\n\
    1.84 ++	.previous\n\
    1.85 + ");
    1.86 + #else
    1.87 +-# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
    1.88 +-	.text
    1.89 +-	.globl _dl_runtime_resolve
    1.90 +-	.globl _dl_runtime_profile
    1.91 +-	.type _dl_runtime_resolve, @function
    1.92 +-	.type _dl_runtime_profile, @function
    1.93 +-	.align 16
    1.94 +-_dl_runtime_resolve:
    1.95 +-_dl_runtime_profile:
    1.96 +-	pushl %eax		# Preserve registers otherwise clobbered.
    1.97 +-	pushl %ecx
    1.98 +-	pushl %edx
    1.99 +-	movl 16(%esp), %edx	# Push the arguments for `fixup'
   1.100 +-	movl 12(%esp), %eax
   1.101 +-	pushl %edx
   1.102 +-	pushl %eax
   1.103 +-	call fixup		# Call resolver.
   1.104 +-	popl %edx		# Pop the parameters
   1.105 +-	popl %ecx
   1.106 +-	popl %edx		# Get register content back.
   1.107 +-	popl %ecx
   1.108 +-	xchgl %eax, (%esp)	# Get %eax contents end store function address.
   1.109 +-	ret $8			# Jump to function address.
   1.110 +-	.size _dl_runtime_resolve, .-_dl_runtime_resolve
   1.111 +-	.size _dl_runtime_profile, .-_dl_runtime_profile
   1.112 +-	.previous
   1.113 ++# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\n\
   1.114 ++	.text\n\
   1.115 ++	.globl _dl_runtime_resolve\n\
   1.116 ++	.globl _dl_runtime_profile\n\
   1.117 ++	.type _dl_runtime_resolve, @function\n\
   1.118 ++	.type _dl_runtime_profile, @function\n\
   1.119 ++	.align 16\n\
   1.120 ++_dl_runtime_resolve:\n\
   1.121 ++_dl_runtime_profile:\n\
   1.122 ++	pushl %eax		# Preserve registers otherwise clobbered.\n\
   1.123 ++	pushl %ecx\n\
   1.124 ++	pushl %edx\n\
   1.125 ++	movl 16(%esp), %edx	# Push the arguments for `fixup'\n\
   1.126 ++	movl 12(%esp), %eax\n\
   1.127 ++	pushl %edx\n\
   1.128 ++	pushl %eax\n\
   1.129 ++	call fixup		# Call resolver.\n\
   1.130 ++	popl %edx		# Pop the parameters\n\
   1.131 ++	popl %ecx\n\
   1.132 ++	popl %edx		# Get register content back.\n\
   1.133 ++	popl %ecx\n\
   1.134 ++	xchgl %eax, (%esp)	# Get %eax contents end store function address.\n\
   1.135 ++	ret $8			# Jump to function address.\n\
   1.136 ++	.size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
   1.137 ++	.size _dl_runtime_profile, .-_dl_runtime_profile\n\
   1.138 ++	.previous\n\
   1.139 + ");
   1.140 + #endif
   1.141 + 
   1.142 +@@ -197,10 +197,10 @@
   1.143 +    The C function `_dl_start' is the real entry point;
   1.144 +    its return value is the user program's entry point.  */
   1.145 + 
   1.146 +-#define RTLD_START asm ("\
   1.147 +-.text\n\
   1.148 +-.globl _start\n\
   1.149 +-.globl _dl_start_user\n\
   1.150 ++#define RTLD_START asm ("\n\
   1.151 ++	.text\n\
   1.152 ++	.globl _start\n\
   1.153 ++	.globl _dl_start_user\n\
   1.154 + _start:\n\
   1.155 + 	pushl %esp\n\
   1.156 + 	call _dl_start\n\
   1.157 +@@ -208,7 +208,7 @@
   1.158 + _dl_start_user:\n\
   1.159 + 	# Save the user entry point address in %edi.\n\
   1.160 + 	movl %eax, %edi\n\
   1.161 +-	# Point %ebx at the GOT.
   1.162 ++	# Point %ebx at the GOT.\n\
   1.163 + 	call 0f\n\
   1.164 + 0:	popl %ebx\n\
   1.165 + 	addl $_GLOBAL_OFFSET_TABLE_+[.-0b], %ebx\n\
   1.166 +@@ -255,7 +255,7 @@
   1.167 + 	movl _dl_fini@GOT(%ebx), %edx\n\
   1.168 + 	# Jump to the user's entry point.\n\
   1.169 + 	jmp *%edi\n\
   1.170 +-.previous\n\
   1.171 ++	.previous\n\
   1.172 + ");
   1.173 + 
   1.174 + /* Nonzero iff TYPE should not be allowed to resolve to one of