]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/glibc/glibc-2.2.5/dl-machine-m68k.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / glibc / glibc-2.2.5 / dl-machine-m68k.patch
1
2 #
3 # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4 #
5
6 --- glibc-2.2.5/sysdeps/m68k/dl-machine.h~dl-machine-m68k.patch 2004-09-03 19:00:33.000000000 -0500
7 +++ glibc-2.2.5/sysdeps/m68k/dl-machine.h       2004-09-03 19:00:37.000000000 -0500
8 @@ -1,5 +1,5 @@
9  /* Machine-dependent ELF dynamic relocation inline functions.  m68k version.
10 -   Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
11 +   Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
12     This file is part of the GNU C Library.
13  
14     The GNU C Library is free software; you can redistribute it and/or
15 @@ -85,11 +85,11 @@
16         {
17           got[2] = (Elf32_Addr) &_dl_runtime_profile;
18  
19 -         if (_dl_name_match_p (_dl_profile, l))
20 +         if (_dl_name_match_p (GL(dl_profile), l))
21             {
22               /* This is the object we are looking for.  Say that we really
23                  want profiling and the timers are started.  */
24 -             _dl_profile_map = l;
25 +             GL(dl_profile_map) = l;
26             }
27         }
28        else
29 @@ -104,22 +104,22 @@
30  /* This code is used in dl-runtime.c to call the `fixup' function
31     and then redirect to the address it returns.  */
32  #define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \
33 -"| Trampoline for " #fixup_name "
34 -       .globl " #tramp_name "
35 -       .type " #tramp_name ", @function
36 -" #tramp_name ":
37 -       | Save %a0 (struct return address) and %a1.
38 -       move.l %a0, -(%sp)
39 -       move.l %a1, -(%sp)
40 -       | Call the real address resolver.
41 -       jbsr " #fixup_name "
42 -       | Restore register %a0 and %a1.
43 -       move.l (%sp)+, %a1
44 -       move.l (%sp)+, %a0
45 -       | Pop parameters
46 -       addq.l #8, %sp
47 -       | Call real function.
48 -       jmp (%d0)
49 +"| Trampoline for " #fixup_name "\n\
50 +       .globl " #tramp_name "\n\
51 +       .type " #tramp_name ", @function\n\
52 +" #tramp_name ":\n\
53 +       | Save %a0 (struct return address) and %a1.\n\
54 +       move.l %a0, -(%sp)\n\
55 +       move.l %a1, -(%sp)\n\
56 +       | Call the real address resolver.\n\
57 +       jbsr " #fixup_name "\n\
58 +       | Restore register %a0 and %a1.\n\
59 +       move.l (%sp)+, %a1\n\
60 +       move.l (%sp)+, %a0\n\
61 +       | Pop parameters\n\
62 +       addq.l #8, %sp\n\
63 +       | Call real function.\n\
64 +       jmp (%d0)\n\
65         .size " #tramp_name ", . - " #tramp_name "\n"
66  #ifndef PROF
67  #define ELF_MACHINE_RUNTIME_TRAMPOLINE \
68 @@ -143,50 +143,50 @@
69     its return value is the user program's entry point.  */
70  
71  #define RTLD_START asm ("\
72 -       .text
73 -       .globl _start
74 -       .type _start,@function
75 -_start:
76 -       move.l %sp, -(%sp)
77 -       jbsr _dl_start
78 -       addq.l #4, %sp
79 -       /* FALLTHRU */
80 -
81 -       .globl _dl_start_user
82 -       .type _dl_start_user,@function
83 -_dl_start_user:
84 -       | Save the user entry point address in %a4.
85 -       move.l %d0, %a4
86 -       | Point %a5 at the GOT.
87 -       lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5
88 -       | Remember the highest stack address.
89 -       move.l %sp, ([__libc_stack_end@GOT.w, %a5])
90 -       | See if we were run as a command with the executable file
91 -       | name as an extra leading argument.
92 -       move.l ([_dl_skip_args@GOT.w, %a5]), %d0
93 -       | Pop the original argument count
94 -       move.l (%sp)+, %d1
95 -       | Subtract _dl_skip_args from it.
96 -       sub.l %d0, %d1
97 -       | Adjust the stack pointer to skip _dl_skip_args words.
98 -       lea (%sp, %d0*4), %sp
99 -       | Push back the modified argument count.
100 -       move.l %d1, -(%sp)
101 -       # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
102 -       pea 8(%sp, %d1*4)
103 -       pea 8(%sp)
104 -       move.l %d1, -(%sp)
105 -       move.l ([_dl_loaded@GOT.w, %a5]), -(%sp)
106 -       jbsr _dl_init@PLTPC
107 -       addq.l #8, %sp
108 -       addq.l #8, %sp
109 -       | Pass our finalizer function to the user in %a1.
110 -       move.l _dl_fini@GOT.w(%a5), %a1
111 -       | Initialize %fp with the stack pointer.
112 -       move.l %sp, %fp
113 -       | Jump to the user's entry point.
114 -       jmp (%a4)
115 -       .size _dl_start_user, . - _dl_start_user
116 +       .text\n\
117 +       .globl _start\n\
118 +       .type _start,@function\n\
119 +_start:\n\
120 +       move.l %sp, -(%sp)\n\
121 +       jbsr _dl_start\n\
122 +       addq.l #4, %sp\n\
123 +       /* FALLTHRU */\n\
124 +\n\
125 +       .globl _dl_start_user\n\
126 +       .type _dl_start_user,@function\n\
127 +_dl_start_user:\n\
128 +       | Save the user entry point address in %a4.\n\
129 +       move.l %d0, %a4\n\
130 +       | Point %a5 at the GOT.\n\
131 +       lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5\n\
132 +       | Remember the highest stack address.\n\
133 +       move.l %sp, ([__libc_stack_end@GOT.w, %a5])\n\
134 +       | See if we were run as a command with the executable file\n\
135 +       | name as an extra leading argument.\n\
136 +       move.l ([_dl_skip_args@GOT.w, %a5]), %d0\n\
137 +       | Pop the original argument count\n\
138 +       move.l (%sp)+, %d1\n\
139 +       | Subtract _dl_skip_args from it.\n\
140 +       sub.l %d0, %d1\n\
141 +       | Adjust the stack pointer to skip _dl_skip_args words.\n\
142 +       lea (%sp, %d0*4), %sp\n\
143 +       | Push back the modified argument count.\n\
144 +       move.l %d1, -(%sp)\n\
145 +       # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)\n\
146 +       pea 8(%sp, %d1*4)\n\
147 +       pea 8(%sp)\n\
148 +       move.l %d1, -(%sp)\n\
149 +       move.l ([_rtld_global@GOT.w, %a5]), -(%sp)\n\
150 +       jbsr _dl_init@PLTPC\n\
151 +       addq.l #8, %sp\n\
152 +       addq.l #8, %sp\n\
153 +       | Pass our finalizer function to the user in %a1.\n\
154 +       move.l _dl_fini@GOT.w(%a5), %a1\n\
155 +       | Initialize %fp with the stack pointer.\n\
156 +       move.l %sp, %fp\n\
157 +       | Jump to the user's entry point.\n\
158 +       jmp (%a4)\n\
159 +       .size _dl_start_user, . - _dl_start_user\n\
160         .previous");
161  
162  /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
163 @@ -251,7 +251,7 @@
164                found.  */
165             break;
166           if (sym->st_size > refsym->st_size
167 -             || (sym->st_size < refsym->st_size && _dl_verbose))
168 +             || (sym->st_size < refsym->st_size && GL(dl_verbose)))
169             {
170               extern char **_dl_argv;
171               const char *strtab;