patches/glibc/2.2.5/dl-machine-m68k.patch
changeset 330 447b203edc2e
parent 329 419d959441ed
child 331 0c05f9ea3254
     1.1 --- a/patches/glibc/2.2.5/dl-machine-m68k.patch	Tue Aug 14 19:32:22 2007 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,206 +0,0 @@
     1.4 -Retrieved with
     1.5 - wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/m68k/dl-machine.h.diff?r1=1.53&r2=1.55&cvsroot=glibc'
     1.6 -
     1.7 -Fixes error
     1.8 -
     1.9 -In file included from dynamic-link.h:21,
    1.10 -                 from dl-load.c:32:
    1.11 -../sysdeps/m68k/dl-machine.h:108: error: parse error before '.' token
    1.12 -../sysdeps/m68k/dl-machine.h:109: error: stray '@' in program
    1.13 -../sysdeps/m68k/dl-machine.h:120: error: syntax error at '#' token
    1.14 -../sysdeps/m68k/dl-machine.h:123: error: stray '\' in program
    1.15 -../sysdeps/m68k/dl-machine.h:123: error: missing terminating " character
    1.16 -../sysdeps/m68k/dl-machine.h:148: error: stray '@' in program
    1.17 -../sysdeps/m68k/dl-machine.h:152: error: syntax error at '#' token
    1.18 -../sysdeps/m68k/dl-machine.h:156: error: stray '@' in program
    1.19 -../sysdeps/m68k/dl-machine.h:161: error: stray '@' in program
    1.20 -../sysdeps/m68k/dl-machine.h:163: error: stray '@' in program
    1.21 -../sysdeps/m68k/dl-machine.h:166: error: stray '@' in program
    1.22 -In file included from dynamic-link.h:21,
    1.23 -                 from dl-load.c:32:
    1.24 -../sysdeps/m68k/dl-machine.h:175:4: invalid preprocessing directive #Call
    1.25 -../sysdeps/m68k/dl-machine.h:179: error: stray '@' in program
    1.26 -../sysdeps/m68k/dl-machine.h:180: error: stray '@' in program
    1.27 -../sysdeps/m68k/dl-machine.h:181: error: syntax error at '#' token
    1.28 -../sysdeps/m68k/dl-machine.h:182: error: syntax error at '#' token
    1.29 -../sysdeps/m68k/dl-machine.h:184: error: stray '@' in program
    1.30 -../sysdeps/m68k/dl-machine.h:187: error: missing terminating ' character
    1.31 -../sysdeps/m68k/dl-machine.h:190: error: missing terminating " character
    1.32 -dl-load.c: In function `_dl_map_object_from_fd':
    1.33 -dl-load.c:1089: warning: use of cast expressions as lvalues is deprecated
    1.34 -dl-load.c:1089: warning: use of cast expressions as lvalues is deprecated
    1.35 -dl-load.c:1109: warning: use of cast expressions as lvalues is deprecated
    1.36 -dl-load.c:1109: warning: use of cast expressions as lvalues is deprecated
    1.37 -make[2]: *** [/home/dank/wk/crosstool-0.28-rc24/build/m68k-unknown-linux-gnu/gcc-3.4.0-glibc-2.2.5/build-glibc/elf/dl-load.o] Error 1
    1.38 -
    1.39 -===================================================================
    1.40 -RCS file: /cvs/glibc/libc/sysdeps/m68k/dl-machine.h,v
    1.41 -retrieving revision 1.53
    1.42 -retrieving revision 1.55
    1.43 -diff -u -r1.53 -r1.55
    1.44 ---- libc/sysdeps/m68k/dl-machine.h	2001/08/26 22:26:36	1.53
    1.45 -+++ libc/sysdeps/m68k/dl-machine.h	2002/02/01 10:28:20	1.55
    1.46 -@@ -1,5 +1,5 @@
    1.47 - /* Machine-dependent ELF dynamic relocation inline functions.  m68k version.
    1.48 --   Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
    1.49 -+   Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
    1.50 -    This file is part of the GNU C Library.
    1.51 - 
    1.52 -    The GNU C Library is free software; you can redistribute it and/or
    1.53 -@@ -85,11 +85,11 @@
    1.54 - 	{
    1.55 - 	  got[2] = (Elf32_Addr) &_dl_runtime_profile;
    1.56 - 
    1.57 --	  if (_dl_name_match_p (_dl_profile, l))
    1.58 -+	  if (_dl_name_match_p (GL(dl_profile), l))
    1.59 - 	    {
    1.60 - 	      /* This is the object we are looking for.  Say that we really
    1.61 - 		 want profiling and the timers are started.  */
    1.62 --	      _dl_profile_map = l;
    1.63 -+	      GL(dl_profile_map) = l;
    1.64 - 	    }
    1.65 - 	}
    1.66 -       else
    1.67 -@@ -104,22 +104,22 @@
    1.68 - /* This code is used in dl-runtime.c to call the `fixup' function
    1.69 -    and then redirect to the address it returns.  */
    1.70 - #define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \
    1.71 --"| Trampoline for " #fixup_name "
    1.72 --	.globl " #tramp_name "
    1.73 --	.type " #tramp_name ", @function
    1.74 --" #tramp_name ":
    1.75 --	| Save %a0 (struct return address) and %a1.
    1.76 --	move.l %a0, -(%sp)
    1.77 --	move.l %a1, -(%sp)
    1.78 --	| Call the real address resolver.
    1.79 --	jbsr " #fixup_name "
    1.80 --	| Restore register %a0 and %a1.
    1.81 --	move.l (%sp)+, %a1
    1.82 --	move.l (%sp)+, %a0
    1.83 --	| Pop parameters
    1.84 --	addq.l #8, %sp
    1.85 --	| Call real function.
    1.86 --	jmp (%d0)
    1.87 -+"| Trampoline for " #fixup_name "\n\
    1.88 -+	.globl " #tramp_name "\n\
    1.89 -+	.type " #tramp_name ", @function\n\
    1.90 -+" #tramp_name ":\n\
    1.91 -+	| Save %a0 (struct return address) and %a1.\n\
    1.92 -+	move.l %a0, -(%sp)\n\
    1.93 -+	move.l %a1, -(%sp)\n\
    1.94 -+	| Call the real address resolver.\n\
    1.95 -+	jbsr " #fixup_name "\n\
    1.96 -+	| Restore register %a0 and %a1.\n\
    1.97 -+	move.l (%sp)+, %a1\n\
    1.98 -+	move.l (%sp)+, %a0\n\
    1.99 -+	| Pop parameters\n\
   1.100 -+	addq.l #8, %sp\n\
   1.101 -+	| Call real function.\n\
   1.102 -+	jmp (%d0)\n\
   1.103 - 	.size " #tramp_name ", . - " #tramp_name "\n"
   1.104 - #ifndef PROF
   1.105 - #define ELF_MACHINE_RUNTIME_TRAMPOLINE \
   1.106 -@@ -143,50 +143,50 @@
   1.107 -    its return value is the user program's entry point.  */
   1.108 - 
   1.109 - #define RTLD_START asm ("\
   1.110 --	.text
   1.111 --	.globl _start
   1.112 --	.type _start,@function
   1.113 --_start:
   1.114 --	move.l %sp, -(%sp)
   1.115 --	jbsr _dl_start
   1.116 --	addq.l #4, %sp
   1.117 --	/* FALLTHRU */
   1.118 --
   1.119 --	.globl _dl_start_user
   1.120 --	.type _dl_start_user,@function
   1.121 --_dl_start_user:
   1.122 --	| Save the user entry point address in %a4.
   1.123 --	move.l %d0, %a4
   1.124 --	| Point %a5 at the GOT.
   1.125 --	lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5
   1.126 --	| Remember the highest stack address.
   1.127 --	move.l %sp, ([__libc_stack_end@GOT.w, %a5])
   1.128 --	| See if we were run as a command with the executable file
   1.129 --	| name as an extra leading argument.
   1.130 --	move.l ([_dl_skip_args@GOT.w, %a5]), %d0
   1.131 --	| Pop the original argument count
   1.132 --	move.l (%sp)+, %d1
   1.133 --	| Subtract _dl_skip_args from it.
   1.134 --	sub.l %d0, %d1
   1.135 --	| Adjust the stack pointer to skip _dl_skip_args words.
   1.136 --	lea (%sp, %d0*4), %sp
   1.137 --	| Push back the modified argument count.
   1.138 --	move.l %d1, -(%sp)
   1.139 --	# Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
   1.140 --	pea 8(%sp, %d1*4)
   1.141 --	pea 8(%sp)
   1.142 --	move.l %d1, -(%sp)
   1.143 --	move.l ([_dl_loaded@GOT.w, %a5]), -(%sp)
   1.144 --	jbsr _dl_init@PLTPC
   1.145 --	addq.l #8, %sp
   1.146 --	addq.l #8, %sp
   1.147 --	| Pass our finalizer function to the user in %a1.
   1.148 --	move.l _dl_fini@GOT.w(%a5), %a1
   1.149 --	| Initialize %fp with the stack pointer.
   1.150 --	move.l %sp, %fp
   1.151 --	| Jump to the user's entry point.
   1.152 --	jmp (%a4)
   1.153 --	.size _dl_start_user, . - _dl_start_user
   1.154 -+	.text\n\
   1.155 -+	.globl _start\n\
   1.156 -+	.type _start,@function\n\
   1.157 -+_start:\n\
   1.158 -+	move.l %sp, -(%sp)\n\
   1.159 -+	jbsr _dl_start\n\
   1.160 -+	addq.l #4, %sp\n\
   1.161 -+	/* FALLTHRU */\n\
   1.162 -+\n\
   1.163 -+	.globl _dl_start_user\n\
   1.164 -+	.type _dl_start_user,@function\n\
   1.165 -+_dl_start_user:\n\
   1.166 -+	| Save the user entry point address in %a4.\n\
   1.167 -+	move.l %d0, %a4\n\
   1.168 -+	| Point %a5 at the GOT.\n\
   1.169 -+	lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5\n\
   1.170 -+	| Remember the highest stack address.\n\
   1.171 -+	move.l %sp, ([__libc_stack_end@GOT.w, %a5])\n\
   1.172 -+	| See if we were run as a command with the executable file\n\
   1.173 -+	| name as an extra leading argument.\n\
   1.174 -+	move.l ([_dl_skip_args@GOT.w, %a5]), %d0\n\
   1.175 -+	| Pop the original argument count\n\
   1.176 -+	move.l (%sp)+, %d1\n\
   1.177 -+	| Subtract _dl_skip_args from it.\n\
   1.178 -+	sub.l %d0, %d1\n\
   1.179 -+	| Adjust the stack pointer to skip _dl_skip_args words.\n\
   1.180 -+	lea (%sp, %d0*4), %sp\n\
   1.181 -+	| Push back the modified argument count.\n\
   1.182 -+	move.l %d1, -(%sp)\n\
   1.183 -+	# Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)\n\
   1.184 -+	pea 8(%sp, %d1*4)\n\
   1.185 -+	pea 8(%sp)\n\
   1.186 -+	move.l %d1, -(%sp)\n\
   1.187 -+	move.l ([_rtld_global@GOT.w, %a5]), -(%sp)\n\
   1.188 -+	jbsr _dl_init@PLTPC\n\
   1.189 -+	addq.l #8, %sp\n\
   1.190 -+	addq.l #8, %sp\n\
   1.191 -+	| Pass our finalizer function to the user in %a1.\n\
   1.192 -+	move.l _dl_fini@GOT.w(%a5), %a1\n\
   1.193 -+	| Initialize %fp with the stack pointer.\n\
   1.194 -+	move.l %sp, %fp\n\
   1.195 -+	| Jump to the user's entry point.\n\
   1.196 -+	jmp (%a4)\n\
   1.197 -+	.size _dl_start_user, . - _dl_start_user\n\
   1.198 - 	.previous");
   1.199 - 
   1.200 - /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
   1.201 -@@ -251,7 +251,7 @@
   1.202 - 	       found.  */
   1.203 - 	    break;
   1.204 - 	  if (sym->st_size > refsym->st_size
   1.205 --	      || (sym->st_size < refsym->st_size && _dl_verbose))
   1.206 -+	      || (sym->st_size < refsym->st_size && GL(dl_verbose)))
   1.207 - 	    {
   1.208 - 	      extern char **_dl_argv;
   1.209 - 	      const char *strtab;