Make regtest work back again.
2 In file included from dynamic-link.h:21,
4 ../sysdeps/arm/dl-machine.h:124:25: missing terminating " character
6 make[2]: *** [/crosstool-0.22/build/arm-unknown-linux-gnu/gcc-3.3-glibc-2.2.5/build-glibc/elf/dl-load.o] Error 1
9 http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/arm/dl-machine.h.diff?r1=1.39&r2=1.40&cvsroot=glibc
10 applied cleanly, but the third hunk didn't, so I just added the \n\'s by hand for that section.
12 --- glibc-2.2.5/sysdeps/arm/dl-machine.h.orig Sat Sep 8 14:31:40 2001
13 +++ glibc-2.2.5/sysdeps/arm/dl-machine.h Wed Aug 27 10:55:26 2003
15 and then redirect to the address it returns. */
16 // macro for handling PIC situation....
18 -#define CALL_ROUTINE(x) " ldr sl,0f
24 -0: .word _GLOBAL_OFFSET_TABLE_ - 1b - 4
25 -2: .word " #x "(GOTOFF)
26 +#define CALL_ROUTINE(x) "\
33 +0: .word _GLOBAL_OFFSET_TABLE_ - 1b - 4\n\
34 +2: .word " #x "(GOTOFF)\n\
37 #define CALL_ROUTINE(x) " bl " #x
38 @@ -136,114 +137,114 @@
41 # define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
43 - .globl _dl_runtime_resolve
44 - .type _dl_runtime_resolve, #function
47 - @ we get called with
48 - @ stack[0] contains the return address from this call
49 - @ ip contains &GOT[n+3] (pointer to function)
50 - @ lr points to &GOT[2]
52 - @ save almost everything; lr is already on the stack
53 - stmdb sp!,{r0-r3,sl,fp}
55 - @ prepare to call fixup()
56 - @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
61 - @ get pointer to linker struct
64 - @ call fixup routine
65 - " CALL_ROUTINE(fixup) "
71 - ldmia sp!,{r0-r3,sl,fp,lr}
73 - @ jump to the newly found address
76 - .size _dl_runtime_resolve, .-_dl_runtime_resolve
78 - .globl _dl_runtime_profile
79 - .type _dl_runtime_profile, #function
82 - @ save almost everything; lr is already on the stack
83 - stmdb sp!,{r0-r3,sl,fp}
85 - @ prepare to call fixup()
86 - @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
91 - @ get pointer to linker struct
94 - @ call profiling fixup routine
95 - " CALL_ROUTINE(profile_fixup) "
100 - @ restore the stack
101 - ldmia sp!,{r0-r3,sl,fp,lr}
103 - @ jump to the newly found address
106 - .size _dl_runtime_resolve, .-_dl_runtime_resolve
109 + .globl _dl_runtime_resolve\n\
110 + .type _dl_runtime_resolve, #function\n\
112 +_dl_runtime_resolve:\n\
113 + @ we get called with\n\
114 + @ stack[0] contains the return address from this call\n\
115 + @ ip contains &GOT[n+3] (pointer to function)\n\
116 + @ lr points to &GOT[2]\n\
118 + @ save almost everything; lr is already on the stack\n\
119 + stmdb sp!,{r0-r3,sl,fp}\n\
121 + @ prepare to call fixup()\n\
122 + @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
127 + @ get pointer to linker struct\n\
128 + ldr r0, [lr, #-4]\n\
130 + @ call fixup routine\n\
131 + " CALL_ROUTINE(fixup) "\n\
133 + @ save the return\n\
136 + @ restore the stack\n\
137 + ldmia sp!,{r0-r3,sl,fp,lr}\n\
139 + @ jump to the newly found address\n\
142 + .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
144 + .globl _dl_runtime_profile\n\
145 + .type _dl_runtime_profile, #function\n\
147 +_dl_runtime_profile:\n\
148 + @ save almost everything; lr is already on the stack\n\
149 + stmdb sp!,{r0-r3,sl,fp}\n\
151 + @ prepare to call fixup()\n\
152 + @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
157 + @ get pointer to linker struct\n\
158 + ldr r0, [lr, #-4]\n\
160 + @ call profiling fixup routine\n\
161 + " CALL_ROUTINE(profile_fixup) "\n\
163 + @ save the return\n\
166 + @ restore the stack\n\
167 + ldmia sp!,{r0-r3,sl,fp,lr}\n\
169 + @ jump to the newly found address\n\
172 + .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
176 # define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
178 - .globl _dl_runtime_resolve
179 - .globl _dl_runtime_profile
180 - .type _dl_runtime_resolve, #function
181 - .type _dl_runtime_profile, #function
183 -_dl_runtime_resolve:
184 -_dl_runtime_profile:
185 - @ we get called with
186 - @ stack[0] contains the return address from this call
187 - @ ip contains &GOT[n+3] (pointer to function)
188 - @ lr points to &GOT[2]
190 - @ save almost everything; return add is already on the stack
191 - stmdb sp!,{r0-r3,sl,fp}
193 - @ prepare to call fixup()
194 - @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
199 - @ get pointer to linker struct
202 - @ call profiling fixup routine
203 - " CALL_ROUTINE(fixup) "
208 - @ restore the stack
209 - ldmia sp!,{r0-r3,sl,fp,lr}
211 - @ jump to the newly found address
214 - .size _dl_runtime_profile, .-_dl_runtime_profile
217 + .globl _dl_runtime_resolve\n\
218 + .globl _dl_runtime_profile\n\
219 + .type _dl_runtime_resolve, #function\n\
220 + .type _dl_runtime_profile, #function\n\
222 +_dl_runtime_resolve:\n\
223 +_dl_runtime_profile:\n\
224 + @ we get called with\n\
225 + @ stack[0] contains the return address from this call\n\
226 + @ ip contains &GOT[n+3] (pointer to function)\n\
227 + @ lr points to &GOT[2]\n\
229 + @ save almost everything; return add is already on the stack\n\
230 + stmdb sp!,{r0-r3,sl,fp}\n\
232 + @ prepare to call fixup()\n\
233 + @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
238 + @ get pointer to linker struct\n\
239 + ldr r0, [lr, #-4]\n\
241 + @ call profiling fixup routine\n\
242 + " CALL_ROUTINE(fixup) "\n\
244 + @ save the return\n\
247 + @ restore the stack\n\
248 + ldmia sp!,{r0-r3,sl,fp,lr}\n\
250 + @ jump to the newly found address\n\
253 + .size _dl_runtime_profile, .-_dl_runtime_profile\n\
258 @@ -256,70 +257,70 @@
259 its return value is the user program's entry point. */
261 #define RTLD_START asm ("\
264 -.globl _dl_start_user
266 - @ at start time, all the args are on the stack
269 - @ returns user entry point in r0
272 - @ we are PIC code, so get global offset table
276 - @ Store the highest stack address
277 - ldr r1, .L_STACK_END
280 - @ See if we were run as a command with the executable file
281 - @ name as an extra leading argument.
282 - ldr r4, .L_SKIP_ARGS
284 - @ get the original arg count
286 - @ subtract _dl_skip_args from it
288 - @ adjust the stack pointer to skip them
289 - add sp, sp, r4, lsl #2
290 - @ get the argv address
292 - @ store the new argc in the new stack location
295 - add r3, r2, r1, lsl #2
298 - @ now we call _dl_init
304 - @ clear the startup flag
305 - ldr r2, .L_STARTUP_FLAG
309 - @ load the finalizer function
310 - ldr r0, .L_FINI_PROC
312 - @ jump to the user_s entry point
317 +.globl _dl_start_user\n\
319 + @ at start time, all the args are on the stack\n\
322 + @ returns user entry point in r0\n\
325 + @ we are PIC code, so get global offset table\n\
326 + ldr sl, .L_GET_GOT\n\
329 + @ Store the highest stack address\n\
330 + ldr r1, .L_STACK_END\n\
331 + ldr r1, [sl, r1]\n\
333 + @ See if we were run as a command with the executable file\n\
334 + @ name as an extra leading argument.\n\
335 + ldr r4, .L_SKIP_ARGS\n\
336 + ldr r4, [sl, r4]\n\
337 + @ get the original arg count\n\
339 + @ subtract _dl_skip_args from it\n\
341 + @ adjust the stack pointer to skip them\n\
342 + add sp, sp, r4, lsl #2\n\
343 + @ get the argv address\n\
345 + @ store the new argc in the new stack location\n\
348 + add r3, r2, r1, lsl #2\n\
351 + @ now we call _dl_init\n\
352 + ldr r0, .L_LOADED\n\
353 + ldr r0, [sl, r0]\n\
356 + bl _dl_init(PLT)\n\
357 + @ clear the startup flag\n\
358 + ldr r2, .L_STARTUP_FLAG\n\
359 + ldr r1, [sl, r2]\n\
362 + @ load the finalizer function\n\
363 + ldr r0, .L_FINI_PROC\n\
364 + ldr r0, [sl, r0]\n\
365 + @ jump to the user_s entry point\n\
368 .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4 \n\
370 .word _dl_skip_args(GOTOFF) \n\
372 - .word _dl_starting_up(GOT)
374 - .word _dl_fini(GOT)
376 - .word __libc_stack_end(GOT)
378 - .word _dl_loaded(GOT)
380 + .word _dl_starting_up(GOT)\n\
382 + .word _dl_fini(GOT)\n\
384 + .word __libc_stack_end(GOT)\n\
386 + .word _dl_loaded(GOT)\n\