summaryrefslogtreecommitdiffstats
path: root/meta/packages
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-10-21 19:18:05 +0000
committerRichard Purdie <richard@openedhand.com>2007-10-21 19:18:05 +0000
commit5c0507f1261416ea6fc67d85de74f292c3b5b2a4 (patch)
tree6118022cfdd046b14f2d55ac7d0aa2baa26b5abb /meta/packages
parentecf406813a2d61f9d8777c892975b168e7e0f78e (diff)
downloadpoky-5c0507f1261416ea6fc67d85de74f292c3b5b2a4.tar.gz
glibc: Drop unused directory
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2943 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages')
-rw-r--r--meta/packages/glibc/glibc-cvs/arm-ioperm.patch13
-rw-r--r--meta/packages/glibc/glibc-cvs/arm-longlong.patch59
-rw-r--r--meta/packages/glibc/glibc-cvs/arm-machine-gmon.patch11
-rw-r--r--meta/packages/glibc/glibc-cvs/arm-memcpy.patch758
-rw-r--r--meta/packages/glibc/glibc-cvs/arm-no-hwcap.patch11
-rw-r--r--meta/packages/glibc/glibc-cvs/dyn-ldconfig-20041128.patch22
-rw-r--r--meta/packages/glibc/glibc-cvs/dyn-ldconfig.patch62
-rw-r--r--meta/packages/glibc/glibc-cvs/eabi-patch-188
-rw-r--r--meta/packages/glibc/glibc-cvs/eabi-patch-22446
-rw-r--r--meta/packages/glibc/glibc-cvs/eabi-patch-3430
-rw-r--r--meta/packages/glibc/glibc-cvs/eabi-patch-464
-rw-r--r--meta/packages/glibc/glibc-cvs/etc/ld.so.conf3
-rw-r--r--meta/packages/glibc/glibc-cvs/glibc-fp-byteorder.patch203
-rw-r--r--meta/packages/glibc/glibc-cvs/ldconfig.patch37
-rw-r--r--meta/packages/glibc/glibc-cvs/ldd.patch38
-rw-r--r--meta/packages/glibc/glibc-cvs/ldsocache-varrun.patch18
-rw-r--r--meta/packages/glibc/glibc-cvs/makeconfig.patch15
-rw-r--r--meta/packages/glibc/glibc-cvs/mips-no-throw.patch22
-rw-r--r--meta/packages/glibc/glibc-cvs/noinfo.patch52
-rw-r--r--meta/packages/glibc/glibc-cvs/trampoline.patch560
20 files changed, 0 insertions, 4912 deletions
diff --git a/meta/packages/glibc/glibc-cvs/arm-ioperm.patch b/meta/packages/glibc/glibc-cvs/arm-ioperm.patch
deleted file mode 100644
index ae9423ef55..0000000000
--- a/meta/packages/glibc/glibc-cvs/arm-ioperm.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1--- sysdeps/unix/sysv/linux/arm/ioperm.c 20 Feb 2003 22:22:35 -0000 1.6
2+++ sysdeps/unix/sysv/linux/arm/ioperm.c 24 Oct 2003 20:59:38 -0000
3@@ -100,8 +100,8 @@
4 {
5 char systype[256];
6 int i, n;
7- static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
8- static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
9+ static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
10+ static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
11 size_t len = sizeof(io.base);
12
13 if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
diff --git a/meta/packages/glibc/glibc-cvs/arm-longlong.patch b/meta/packages/glibc/glibc-cvs/arm-longlong.patch
deleted file mode 100644
index dfb9309b7b..0000000000
--- a/meta/packages/glibc/glibc-cvs/arm-longlong.patch
+++ /dev/null
@@ -1,59 +0,0 @@
1--- stdlib/longlong.h~ 2002-09-29 18:45:58.000000000 +0100
2+++ stdlib/longlong.h 2004-03-20 19:16:44.000000000 +0000
3@@ -210,6 +210,14 @@
4 "rI" ((USItype) (bh)), \
5 "r" ((USItype) (al)), \
6 "rI" ((USItype) (bl)))
7+/* v3m and all higher arches have long multiply support. */
8+#if !defined(__ARM_ARCH_2__) && !defined(__ARM_ARCH_3__)
9+#define umul_ppmm(xh, xl, a, b) \
10+ __asm__ ("umull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b))
11+#define UMUL_TIME 5
12+#define smul_ppmm(xh, xl, a, b) \
13+ __asm__ ("smull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b))
14+#else
15 #define umul_ppmm(xh, xl, a, b) \
16 {register USItype __t0, __t1, __t2; \
17 __asm__ ("%@ Inlined umul_ppmm\n" \
18@@ -231,7 +239,14 @@
19 : "r" ((USItype) (a)), \
20 "r" ((USItype) (b)));}
21 #define UMUL_TIME 20
22+#endif
23 #define UDIV_TIME 100
24+
25+#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__)
26+#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X))
27+#define COUNT_LEADING_ZEROS_0 32
28+#endif
29+
30 #endif /* __arm__ */
31
32 #if defined (__hppa) && W_TYPE_SIZE == 32
33--- /dev/null 2004-02-02 20:32:13.000000000 +0000
34+++ sysdeps/arm/mp_clz_tab.c 2004-03-20 19:24:26.000000000 +0000
35@@ -0,0 +1,24 @@
36+/* __clz_tab -- support for longlong.h
37+ Copyright (C) 2004 Free Software Foundation, Inc.
38+ This file is part of the GNU C Library.
39+
40+ The GNU C Library is free software; you can redistribute it and/or
41+ modify it under the terms of the GNU Lesser General Public
42+ License as published by the Free Software Foundation; either
43+ version 2.1 of the License, or (at your option) any later version.
44+
45+ The GNU C Library is distributed in the hope that it will be useful,
46+ but WITHOUT ANY WARRANTY; without even the implied warranty of
47+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
48+ Lesser General Public License for more details.
49+
50+ You should have received a copy of the GNU Lesser General Public
51+ License along with the GNU C Library; if not, write to the Free
52+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
53+ 02111-1307 USA. */
54+
55+#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__)
56+/* Nothing required. */
57+#else
58+#include <sysdeps/generic/mp_clz_tab.c>
59+#endif
diff --git a/meta/packages/glibc/glibc-cvs/arm-machine-gmon.patch b/meta/packages/glibc/glibc-cvs/arm-machine-gmon.patch
deleted file mode 100644
index 0fa789d86b..0000000000
--- a/meta/packages/glibc/glibc-cvs/arm-machine-gmon.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1--- sysdeps/arm/machine-gmon.h~ 2001-07-06 00:55:48.000000000 -0400
2+++ sysdeps/arm/machine-gmon.h 2004-04-25 03:56:20.000000000 -0400
3@@ -35,7 +35,7 @@
4 static void mcount_internal (u_long frompc, u_long selfpc);
5
6 #define _MCOUNT_DECL(frompc, selfpc) \
7-static void mcount_internal (u_long frompc, u_long selfpc)
8+static __attribute__((used)) void mcount_internal (u_long frompc, u_long selfpc)
9
10 /* This macro/func MUST save r0, r1 because the compiler inserts
11 blind calls to _mount(), ignoring the fact that _mcount may
diff --git a/meta/packages/glibc/glibc-cvs/arm-memcpy.patch b/meta/packages/glibc/glibc-cvs/arm-memcpy.patch
deleted file mode 100644
index bc2b3dab84..0000000000
--- a/meta/packages/glibc/glibc-cvs/arm-memcpy.patch
+++ /dev/null
@@ -1,758 +0,0 @@
1--- /dev/null 2004-02-02 20:32:13.000000000 +0000
2+++ sysdeps/arm/memmove.S 2004-03-20 18:37:23.000000000 +0000
3@@ -0,0 +1,251 @@
4+/*
5+ * Optimized memmove implementation for ARM processors
6+ *
7+ * Author: Nicolas Pitre
8+ * Created: Dec 23, 2003
9+ * Copyright: (C) MontaVista Software, Inc.
10+ *
11+ * This file is free software; you can redistribute it and/or
12+ * modify it under the terms of the GNU Lesser General Public
13+ * License as published by the Free Software Foundation; either
14+ * version 2.1 of the License, or (at your option) any later version.
15+ *
16+ * This file is distributed in the hope that it will be useful,
17+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
18+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19+ * Lesser General Public License for more details.
20+ */
21+
22+#include <sysdep.h>
23+
24+
25+/*
26+ * Endian independent macros for shifting bytes within registers.
27+ */
28+#ifndef __ARMEB__
29+#define pull lsr
30+#define push lsl
31+#else
32+#define pull lsl
33+#define push lsr
34+#endif
35+
36+/*
37+ * Enable data preload for architectures that support it (ARMv5 and above)
38+ */
39+#if defined(__ARM_ARCH_5__) || \
40+ defined(__ARM_ARCH_5T__) || \
41+ defined(__ARM_ARCH_5TE__)
42+#define PLD(code...) code
43+#else
44+#define PLD(code...)
45+#endif
46+
47+
48+/* char * memmove (char *dst, const char *src) */
49+ENTRY(memmove)
50+ subs ip, r0, r1
51+ cmphi r2, ip
52+ bls memcpy(PLT)
53+
54+ stmfd sp!, {r0, r4, lr}
55+ add r1, r1, r2
56+ add r0, r0, r2
57+ subs r2, r2, #4
58+ blt 25f
59+ ands ip, r0, #3
60+ PLD( pld [r1, #-4] )
61+ bne 26f
62+ ands ip, r1, #3
63+ bne 27f
64+
65+19: subs r2, r2, #4
66+ blt 24f
67+ subs r2, r2, #8
68+ blt 23f
69+ subs r2, r2, #16
70+ blt 22f
71+
72+ PLD( pld [r1, #-32] )
73+ PLD( subs r2, r2, #96 )
74+ stmfd sp!, {r5 - r8}
75+ PLD( blt 21f )
76+
77+ PLD( @ cache alignment )
78+ PLD( ands ip, r1, #31 )
79+ PLD( pld [r1, #-64] )
80+ PLD( beq 20f )
81+ PLD( cmp r2, ip )
82+ PLD( pld [r1, #-96] )
83+ PLD( blt 20f )
84+ PLD( cmp ip, #16 )
85+ PLD( sub r2, r2, ip )
86+ PLD( ldmgedb r1!, {r3 - r6} )
87+ PLD( stmgedb r0!, {r3 - r6} )
88+ PLD( beq 20f )
89+ PLD( and ip, ip, #15 )
90+ PLD( cmp ip, #8 )
91+ PLD( ldr r3, [r1, #-4]! )
92+ PLD( ldrge r4, [r1, #-4]! )
93+ PLD( ldrgt r5, [r1, #-4]! )
94+ PLD( str r3, [r0, #-4]! )
95+ PLD( strge r4, [r0, #-4]! )
96+ PLD( strgt r5, [r0, #-4]! )
97+
98+20: PLD( pld [r1, #-96] )
99+ PLD( pld [r1, #-128] )
100+21: ldmdb r1!, {r3, r4, ip, lr}
101+ subs r2, r2, #32
102+ stmdb r0!, {r3, r4, ip, lr}
103+ ldmdb r1!, {r3, r4, ip, lr}
104+ stmgedb r0!, {r3, r4, ip, lr}
105+ ldmgedb r1!, {r3, r4, ip, lr}
106+ stmgedb r0!, {r3, r4, ip, lr}
107+ ldmgedb r1!, {r3, r4, ip, lr}
108+ subges r2, r2, #32
109+ stmdb r0!, {r3, r4, ip, lr}
110+ bge 20b
111+ PLD( cmn r2, #96 )
112+ PLD( bge 21b )
113+ PLD( add r2, r2, #96 )
114+ tst r2, #31
115+ ldmfd sp!, {r5 - r8}
116+ ldmeqfd sp!, {r0, r4, pc}
117+
118+ tst r2, #16
119+22: ldmnedb r1!, {r3, r4, ip, lr}
120+ stmnedb r0!, {r3, r4, ip, lr}
121+
122+ tst r2, #8
123+23: ldmnedb r1!, {r3, r4}
124+ stmnedb r0!, {r3, r4}
125+
126+ tst r2, #4
127+24: ldrne r3, [r1, #-4]!
128+ strne r3, [r0, #-4]!
129+
130+25: ands r2, r2, #3
131+ ldmeqfd sp!, {r0, r4, pc}
132+
133+ cmp r2, #2
134+ ldrb r3, [r1, #-1]
135+ ldrgeb r4, [r1, #-2]
136+ ldrgtb ip, [r1, #-3]
137+ strb r3, [r0, #-1]
138+ strgeb r4, [r0, #-2]
139+ strgtb ip, [r0, #-3]
140+ ldmfd sp!, {r0, r4, pc}
141+
142+26: cmp ip, #2
143+ ldrb r3, [r1, #-1]!
144+ ldrgeb r4, [r1, #-1]!
145+ ldrgtb lr, [r1, #-1]!
146+ strb r3, [r0, #-1]!
147+ strgeb r4, [r0, #-1]!
148+ strgtb lr, [r0, #-1]!
149+ subs r2, r2, ip
150+ blt 25b
151+ ands ip, r1, #3
152+ beq 19b
153+
154+27: bic r1, r1, #3
155+ cmp ip, #2
156+ ldr r3, [r1]
157+ beq 35f
158+ blt 36f
159+
160+
161+ .macro backward_copy_shift push pull
162+
163+ cmp r2, #12
164+ PLD( pld [r1, #-4] )
165+ blt 33f
166+ subs r2, r2, #28
167+ stmfd sp!, {r5 - r9}
168+ blt 31f
169+
170+ PLD( subs r2, r2, #96 )
171+ PLD( pld [r1, #-32] )
172+ PLD( blt 30f )
173+ PLD( pld [r1, #-64] )
174+
175+ PLD( @ cache alignment )
176+ PLD( ands ip, r1, #31 )
177+ PLD( pld [r1, #-96] )
178+ PLD( beq 29f )
179+ PLD( cmp r2, ip )
180+ PLD( pld [r1, #-128] )
181+ PLD( blt 29f )
182+ PLD( sub r2, r2, ip )
183+28: PLD( mov r4, r3, push #\push )
184+ PLD( ldr r3, [r1, #-4]! )
185+ PLD( subs ip, ip, #4 )
186+ PLD( orr r4, r4, r3, pull #\pull )
187+ PLD( str r4, [r0, #-4]! )
188+ PLD( bgt 28b )
189+
190+29: PLD( pld [r1, #-128] )
191+30: mov lr, r3, push #\push
192+ ldmdb r1!, {r3 - r9, ip}
193+ subs r2, r2, #32
194+ orr lr, lr, ip, pull #\pull
195+ mov ip, ip, push #\push
196+ orr ip, ip, r9, pull #\pull
197+ mov r9, r9, push #\push
198+ orr r9, r9, r8, pull #\pull
199+ mov r8, r8, push #\push
200+ orr r8, r8, r7, pull #\pull
201+ mov r7, r7, push #\push
202+ orr r7, r7, r6, pull #\pull
203+ mov r6, r6, push #\push
204+ orr r6, r6, r5, pull #\pull
205+ mov r5, r5, push #\push
206+ orr r5, r5, r4, pull #\pull
207+ mov r4, r4, push #\push
208+ orr r4, r4, r3, pull #\pull
209+ stmdb r0!, {r4 - r9, ip, lr}
210+ bge 29b
211+ PLD( cmn r2, #96 )
212+ PLD( bge 30b )
213+ PLD( add r2, r2, #96 )
214+ cmn r2, #16
215+ blt 32f
216+31: mov r7, r3, push #\push
217+ ldmdb r1!, {r3 - r6}
218+ sub r2, r2, #16
219+ orr r7, r7, r6, pull #\pull
220+ mov r6, r6, push #\push
221+ orr r6, r6, r5, pull #\pull
222+ mov r5, r5, push #\push
223+ orr r5, r5, r4, pull #\pull
224+ mov r4, r4, push #\push
225+ orr r4, r4, r3, pull #\pull
226+ stmdb r0!, {r4 - r7}
227+32: adds r2, r2, #28
228+ ldmfd sp!, {r5 - r9}
229+ blt 34f
230+33: mov r4, r3, push #\push
231+ ldr r3, [r1, #-4]!
232+ subs r2, r2, #4
233+ orr r4, r4, r3, pull #\pull
234+ str r4, [r0, #-4]!
235+ bge 33b
236+34:
237+ .endm
238+
239+
240+ backward_copy_shift push=8 pull=24
241+ add r1, r1, #3
242+ b 25b
243+
244+35: backward_copy_shift push=16 pull=16
245+ add r1, r1, #2
246+ b 25b
247+
248+36: backward_copy_shift push=24 pull=8
249+ add r1, r1, #1
250+ b 25b
251+
252+ .size memmove, . - memmove
253+END(memmove)
254+libc_hidden_builtin_def (memmove)
255--- /dev/null 2004-02-02 20:32:13.000000000 +0000
256+++ sysdeps/arm/bcopy.S 2004-03-20 18:37:48.000000000 +0000
257@@ -0,0 +1,255 @@
258+/*
259+ * Optimized memmove implementation for ARM processors
260+ *
261+ * Author: Nicolas Pitre
262+ * Created: Dec 23, 2003
263+ * Copyright: (C) MontaVista Software, Inc.
264+ *
265+ * This file is free software; you can redistribute it and/or
266+ * modify it under the terms of the GNU Lesser General Public
267+ * License as published by the Free Software Foundation; either
268+ * version 2.1 of the License, or (at your option) any later version.
269+ *
270+ * This file is distributed in the hope that it will be useful,
271+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
272+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
273+ * Lesser General Public License for more details.
274+ */
275+
276+#include <sysdep.h>
277+
278+
279+/*
280+ * Endian independent macros for shifting bytes within registers.
281+ */
282+#ifndef __ARMEB__
283+#define pull lsr
284+#define push lsl
285+#else
286+#define pull lsl
287+#define push lsr
288+#endif
289+
290+/*
291+ * Enable data preload for architectures that support it (ARMv5 and above)
292+ */
293+#if defined(__ARM_ARCH_5__) || \
294+ defined(__ARM_ARCH_5T__) || \
295+ defined(__ARM_ARCH_5TE__)
296+#define PLD(code...) code
297+#else
298+#define PLD(code...)
299+#endif
300+
301+dst .req r1
302+src .req r0
303+
304+/* void *bcopy (const char *src, char *dst, size_t size) */
305+ENTRY(bcopy)
306+ subs ip, dst, src
307+ cmphi r2, ip
308+ movls r3, r0
309+ movls r0, r1
310+ movls r1, r3
311+ bls memcpy(PLT)
312+
313+ stmfd sp!, {r4, lr}
314+ add src, src, r2
315+ add dst, dst, r2
316+ subs r2, r2, #4
317+ blt 25f
318+ ands ip, dst, #3
319+ PLD( pld [src, #-4] )
320+ bne 26f
321+ ands ip, src, #3
322+ bne 27f
323+
324+19: subs r2, r2, #4
325+ blt 24f
326+ subs r2, r2, #8
327+ blt 23f
328+ subs r2, r2, #16
329+ blt 22f
330+
331+ PLD( pld [src, #-32] )
332+ PLD( subs r2, r2, #96 )
333+ stmfd sp!, {r5 - r8}
334+ PLD( blt 21f )
335+
336+ PLD( @ cache alignment )
337+ PLD( ands ip, src, #31 )
338+ PLD( pld [src, #-64] )
339+ PLD( beq 20f )
340+ PLD( cmp r2, ip )
341+ PLD( pld [src, #-96] )
342+ PLD( blt 20f )
343+ PLD( cmp ip, #16 )
344+ PLD( sub r2, r2, ip )
345+ PLD( ldmgedb src!, {r3 - r6} )
346+ PLD( stmgedb dst!, {r3 - r6} )
347+ PLD( beq 20f )
348+ PLD( and ip, ip, #15 )
349+ PLD( cmp ip, #8 )
350+ PLD( ldr r3, [src, #-4]! )
351+ PLD( ldrge r4, [src, #-4]! )
352+ PLD( ldrgt r5, [src, #-4]! )
353+ PLD( str r3, [dst, #-4]! )
354+ PLD( strge r4, [dst, #-4]! )
355+ PLD( strgt r5, [dst, #-4]! )
356+
357+20: PLD( pld [src, #-96] )
358+ PLD( pld [src, #-128] )
359+21: ldmdb src!, {r3, r4, ip, lr}
360+ subs r2, r2, #32
361+ stmdb dst!, {r3, r4, ip, lr}
362+ ldmdb src!, {r3, r4, ip, lr}
363+ stmgedb dst!, {r3, r4, ip, lr}
364+ ldmgedb src!, {r3, r4, ip, lr}
365+ stmgedb dst!, {r3, r4, ip, lr}
366+ ldmgedb src!, {r3, r4, ip, lr}
367+ subges r2, r2, #32
368+ stmdb dst!, {r3, r4, ip, lr}
369+ bge 20b
370+ PLD( cmn r2, #96 )
371+ PLD( bge 21b )
372+ PLD( add r2, r2, #96 )
373+ tst r2, #31
374+ ldmfd sp!, {r5 - r8}
375+ ldmeqfd sp!, {r4, pc}
376+
377+ tst r2, #16
378+22: ldmnedb src!, {r3, r4, ip, lr}
379+ stmnedb dst!, {r3, r4, ip, lr}
380+
381+ tst r2, #8
382+23: ldmnedb src!, {r3, r4}
383+ stmnedb dst!, {r3, r4}
384+
385+ tst r2, #4
386+24: ldrne r3, [src, #-4]!
387+ strne r3, [dst, #-4]!
388+
389+25: ands r2, r2, #3
390+ ldmeqfd sp!, {dst, r4, pc}
391+
392+ cmp r2, #2
393+ ldrb r3, [src, #-1]
394+ ldrgeb r4, [src, #-2]
395+ ldrgtb ip, [src, #-3]
396+ strb r3, [dst, #-1]
397+ strgeb r4, [dst, #-2]
398+ strgtb ip, [dst, #-3]
399+ ldmfd sp!, {dst, r4, pc}
400+
401+26: cmp ip, #2
402+ ldrb r3, [src, #-1]!
403+ ldrgeb r4, [src, #-1]!
404+ ldrgtb lr, [src, #-1]!
405+ strb r3, [dst, #-1]!
406+ strgeb r4, [dst, #-1]!
407+ strgtb lr, [dst, #-1]!
408+ subs r2, r2, ip
409+ blt 25b
410+ ands ip, src, #3
411+ beq 19b
412+
413+27: bic src, src, #3
414+ cmp ip, #2
415+ ldr r3, [src]
416+ beq 35f
417+ blt 36f
418+
419+
420+ .macro backward_copy_shift push pull
421+
422+ cmp r2, #12
423+ PLD( pld [src, #-4] )
424+ blt 33f
425+ subs r2, r2, #28
426+ stmfd sp!, {r5 - r9}
427+ blt 31f
428+
429+ PLD( subs r2, r2, #96 )
430+ PLD( pld [src, #-32] )
431+ PLD( blt 30f )
432+ PLD( pld [src, #-64] )
433+
434+ PLD( @ cache alignment )
435+ PLD( ands ip, src, #31 )
436+ PLD( pld [src, #-96] )
437+ PLD( beq 29f )
438+ PLD( cmp r2, ip )
439+ PLD( pld [src, #-128] )
440+ PLD( blt 29f )
441+ PLD( sub r2, r2, ip )
442+28: PLD( mov r4, r3, push #\push )
443+ PLD( ldr r3, [src, #-4]! )
444+ PLD( subs ip, ip, #4 )
445+ PLD( orr r4, r4, r3, pull #\pull )
446+ PLD( str r4, [dst, #-4]! )
447+ PLD( bgt 28b )
448+
449+29: PLD( pld [src, #-128] )
450+30: mov lr, r3, push #\push
451+ ldmdb src!, {r3 - r9, ip}
452+ subs r2, r2, #32
453+ orr lr, lr, ip, pull #\pull
454+ mov ip, ip, push #\push
455+ orr ip, ip, r9, pull #\pull
456+ mov r9, r9, push #\push
457+ orr r9, r9, r8, pull #\pull
458+ mov r8, r8, push #\push
459+ orr r8, r8, r7, pull #\pull
460+ mov r7, r7, push #\push
461+ orr r7, r7, r6, pull #\pull
462+ mov r6, r6, push #\push
463+ orr r6, r6, r5, pull #\pull
464+ mov r5, r5, push #\push
465+ orr r5, r5, r4, pull #\pull
466+ mov r4, r4, push #\push
467+ orr r4, r4, r3, pull #\pull
468+ stmdb dst!, {r4 - r9, ip, lr}
469+ bge 29b
470+ PLD( cmn r2, #96 )
471+ PLD( bge 30b )
472+ PLD( add r2, r2, #96 )
473+ cmn r2, #16
474+ blt 32f
475+31: mov r7, r3, push #\push
476+ ldmdb src!, {r3 - r6}
477+ sub r2, r2, #16
478+ orr r7, r7, r6, pull #\pull
479+ mov r6, r6, push #\push
480+ orr r6, r6, r5, pull #\pull
481+ mov r5, r5, push #\push
482+ orr r5, r5, r4, pull #\pull
483+ mov r4, r4, push #\push
484+ orr r4, r4, r3, pull #\pull
485+ stmdb dst!, {r4 - r7}
486+32: adds r2, r2, #28
487+ ldmfd sp!, {r5 - r9}
488+ blt 34f
489+33: mov r4, r3, push #\push
490+ ldr r3, [src, #-4]!
491+ subs r2, r2, #4
492+ orr r4, r4, r3, pull #\pull
493+ str r4, [dst, #-4]!
494+ bge 33b
495+34:
496+ .endm
497+
498+
499+ backward_copy_shift push=8 pull=24
500+ add src, src, #3
501+ b 25b
502+
503+35: backward_copy_shift push=16 pull=16
504+ add src, src, #2
505+ b 25b
506+
507+36: backward_copy_shift push=24 pull=8
508+ add src, src, #1
509+ b 25b
510+
511+ .size bcopy, . - bcopy
512+END(bcopy)
513
514--- /dev/null 2004-02-02 20:32:13.000000000 +0000
515+++ sysdeps/arm/memcpy.S 2004-05-02 14:33:22.000000000 +0100
516@@ -0,0 +1,242 @@
517+/*
518+ * Optimized memcpy implementation for ARM processors
519+ *
520+ * Author: Nicolas Pitre
521+ * Created: Dec 23, 2003
522+ * Copyright: (C) MontaVista Software, Inc.
523+ *
524+ * This file is free software; you can redistribute it and/or
525+ * modify it under the terms of the GNU Lesser General Public
526+ * License as published by the Free Software Foundation; either
527+ * version 2.1 of the License, or (at your option) any later version.
528+ *
529+ * This file is distributed in the hope that it will be useful,
530+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
531+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
532+ * Lesser General Public License for more details.
533+ */
534+
535+#include <sysdep.h>
536+
537+
538+/*
539+ * Endian independent macros for shifting bytes within registers.
540+ */
541+#ifndef __ARMEB__
542+#define pull lsr
543+#define push lsl
544+#else
545+#define pull lsl
546+#define push lsr
547+#endif
548+
549+/*
550+ * Enable data preload for architectures that support it (ARMv5 and above)
551+ */
552+#if defined(__ARM_ARCH_5__) || \
553+ defined(__ARM_ARCH_5T__) || \
554+ defined(__ARM_ARCH_5TE__)
555+#define PLD(code...) code
556+#else
557+#define PLD(code...)
558+#endif
559+
560+
561+/* char * memcpy (char *dst, const char *src) */
562+
563+ENTRY(memcpy)
564+ subs r2, r2, #4
565+ stmfd sp!, {r0, r4, lr}
566+ blt 7f
567+ ands ip, r0, #3
568+ PLD( pld [r1, #0] )
569+ bne 8f
570+ ands ip, r1, #3
571+ bne 9f
572+
573+1: subs r2, r2, #4
574+ blt 6f
575+ subs r2, r2, #8
576+ blt 5f
577+ subs r2, r2, #16
578+ blt 4f
579+
580+ PLD( subs r2, r2, #65 )
581+ stmfd sp!, {r5 - r8}
582+ PLD( blt 3f )
583+ PLD( pld [r1, #32] )
584+
585+ PLD( @ cache alignment )
586+ PLD( ands ip, r1, #31 )
587+ PLD( pld [r1, #64] )
588+ PLD( beq 2f )
589+ PLD( rsb ip, ip, #32 )
590+ PLD( cmp r2, ip )
591+ PLD( pld [r1, #96] )
592+ PLD( blt 2f )
593+ PLD( cmp ip, #16 )
594+ PLD( sub r2, r2, ip )
595+ PLD( ldmgeia r1!, {r3 - r6} )
596+ PLD( stmgeia r0!, {r3 - r6} )
597+ PLD( beq 2f )
598+ PLD( and ip, ip, #15 )
599+ PLD( cmp ip, #8 )
600+ PLD( ldr r3, [r1], #4 )
601+ PLD( ldrge r4, [r1], #4 )
602+ PLD( ldrgt r5, [r1], #4 )
603+ PLD( str r3, [r0], #4 )
604+ PLD( strge r4, [r0], #4 )
605+ PLD( strgt r5, [r0], #4 )
606+
607+2: PLD( pld [r1, #96] )
608+3: ldmia r1!, {r3 - r8, ip, lr}
609+ subs r2, r2, #32
610+ stmia r0!, {r3 - r8, ip, lr}
611+ bge 2b
612+ PLD( cmn r2, #65 )
613+ PLD( bge 3b )
614+ PLD( add r2, r2, #65 )
615+ tst r2, #31
616+ ldmfd sp!, {r5 - r8}
617+ ldmeqfd sp!, {r0, r4, pc}
618+
619+ tst r2, #16
620+4: ldmneia r1!, {r3, r4, ip, lr}
621+ stmneia r0!, {r3, r4, ip, lr}
622+
623+ tst r2, #8
624+5: ldmneia r1!, {r3, r4}
625+ stmneia r0!, {r3, r4}
626+
627+ tst r2, #4
628+6: ldrne r3, [r1], #4
629+ strne r3, [r0], #4
630+
631+7: ands r2, r2, #3
632+ ldmeqfd sp!, {r0, r4, pc}
633+
634+ cmp r2, #2
635+ ldrb r3, [r1], #1
636+ ldrgeb r4, [r1], #1
637+ ldrgtb ip, [r1]
638+ strb r3, [r0], #1
639+ strgeb r4, [r0], #1
640+ strgtb ip, [r0]
641+ ldmfd sp!, {r0, r4, pc}
642+
643+8: rsb ip, ip, #4
644+ cmp ip, #2
645+ ldrb r3, [r1], #1
646+ ldrgeb r4, [r1], #1
647+ ldrgtb lr, [r1], #1
648+ strb r3, [r0], #1
649+ strgeb r4, [r0], #1
650+ strgtb lr, [r0], #1
651+ subs r2, r2, ip
652+ blt 7b
653+ ands ip, r1, #3
654+ beq 1b
655+
656+9: bic r1, r1, #3
657+ cmp ip, #2
658+ ldr lr, [r1], #4
659+ beq 17f
660+ bgt 18f
661+
662+
663+ .macro forward_copy_shift pull push
664+
665+ cmp r2, #12
666+ PLD( pld [r1, #0] )
667+ blt 15f
668+ subs r2, r2, #28
669+ stmfd sp!, {r5 - r9}
670+ blt 13f
671+
672+ PLD( subs r2, r2, #97 )
673+ PLD( blt 12f )
674+ PLD( pld [r1, #32] )
675+
676+ PLD( @ cache alignment )
677+ PLD( rsb ip, r1, #36 )
678+ PLD( pld [r1, #64] )
679+ PLD( ands ip, ip, #31 )
680+ PLD( pld [r1, #96] )
681+ PLD( beq 11f )
682+ PLD( cmp r2, ip )
683+ PLD( pld [r1, #128] )
684+ PLD( blt 11f )
685+ PLD( sub r2, r2, ip )
686+10: PLD( mov r3, lr, pull #\pull )
687+ PLD( ldr lr, [r1], #4 )
688+ PLD( subs ip, ip, #4 )
689+ PLD( orr r3, r3, lr, push #\push )
690+ PLD( str r3, [r0], #4 )
691+ PLD( bgt 10b )
692+
693+11: PLD( pld [r1, #128] )
694+12: mov r3, lr, pull #\pull
695+ ldmia r1!, {r4 - r9, ip, lr}
696+ subs r2, r2, #32
697+ orr r3, r3, r4, push #\push
698+ mov r4, r4, pull #\pull
699+ orr r4, r4, r5, push #\push
700+ mov r5, r5, pull #\pull
701+ orr r5, r5, r6, push #\push
702+ mov r6, r6, pull #\pull
703+ orr r6, r6, r7, push #\push
704+ mov r7, r7, pull #\pull
705+ orr r7, r7, r8, push #\push
706+ mov r8, r8, pull #\pull
707+ orr r8, r8, r9, push #\push
708+ mov r9, r9, pull #\pull
709+ orr r9, r9, ip, push #\push
710+ mov ip, ip, pull #\pull
711+ orr ip, ip, lr, push #\push
712+ stmia r0!, {r3 - r9, ip}
713+ bge 11b
714+ PLD( cmn r2, #97 )
715+ PLD( bge 12b )
716+ PLD( add r2, r2, #97 )
717+ cmn r2, #16
718+ blt 14f
719+13: mov r3, lr, pull #\pull
720+ ldmia r1!, {r4 - r6, lr}
721+ sub r2, r2, #16
722+ orr r3, r3, r4, push #\push
723+ mov r4, r4, pull #\pull
724+ orr r4, r4, r5, push #\push
725+ mov r5, r5, pull #\pull
726+ orr r5, r5, r6, push #\push
727+ mov r6, r6, pull #\pull
728+ orr r6, r6, lr, push #\push
729+ stmia r0!, {r3 - r6}
730+14: adds r2, r2, #28
731+ ldmfd sp!, {r5 - r9}
732+ blt 16f
733+15: mov r3, lr, pull #\pull
734+ ldr lr, [r1], #4
735+ subs r2, r2, #4
736+ orr r3, r3, lr, push #\push
737+ str r3, [r0], #4
738+ bge 15b
739+16:
740+ .endm
741+
742+
743+ forward_copy_shift pull=8 push=24
744+ sub r1, r1, #3
745+ b 7b
746+
747+17: forward_copy_shift pull=16 push=16
748+ sub r1, r1, #2
749+ b 7b
750+
751+18: forward_copy_shift pull=24 push=8
752+ sub r1, r1, #1
753+ b 7b
754+
755+ .size memcpy, . - memcpy
756+END(memcpy)
757+libc_hidden_builtin_def (memcpy)
758+
diff --git a/meta/packages/glibc/glibc-cvs/arm-no-hwcap.patch b/meta/packages/glibc/glibc-cvs/arm-no-hwcap.patch
deleted file mode 100644
index 17bfdcd125..0000000000
--- a/meta/packages/glibc/glibc-cvs/arm-no-hwcap.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1--- sysdeps/unix/sysv/linux/arm/dl-procinfo.h Mon Jul 23 12:57:23 2001
2+++ sysdeps/unix/sysv/linux/arm/dl-procinfo.h Sun Feb 10 06:37:00 2002
3@@ -67,7 +67,7 @@
4 HWCAP_ARM_VFP = 1 << 6,
5 HWCAP_ARM_EDSP = 1 << 7,
6
7- HWCAP_IMPORTANT = (HWCAP_ARM_HALF | HWCAP_ARM_FAST_MULT)
8+ HWCAP_IMPORTANT = HWCAP_ARM_FAST_MULT
9 };
10
11 static inline int
diff --git a/meta/packages/glibc/glibc-cvs/dyn-ldconfig-20041128.patch b/meta/packages/glibc/glibc-cvs/dyn-ldconfig-20041128.patch
deleted file mode 100644
index 451b6d4afc..0000000000
--- a/meta/packages/glibc/glibc-cvs/dyn-ldconfig-20041128.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- libc/elf/Makefile~dyn-ldconfig-20041128
7+++ libc/elf/Makefile
8@@ -118,12 +118,13 @@
9
10 ifeq (yes,$(use-ldconfig))
11 ifeq (yes,$(build-shared))
12-others-static += ldconfig
13+#others-static += ldconfig
14 others += ldconfig
15 install-rootsbin += ldconfig
16
17 ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon
18 extra-objs += $(ldconfig-modules:=.o)
19+CPPFLAGS-readlib.c = -DNOT_IN_libc=1
20
21 # To find xmalloc.c and xstrdup.c
22 vpath %.c ../locale/programs
diff --git a/meta/packages/glibc/glibc-cvs/dyn-ldconfig.patch b/meta/packages/glibc/glibc-cvs/dyn-ldconfig.patch
deleted file mode 100644
index 1041965d05..0000000000
--- a/meta/packages/glibc/glibc-cvs/dyn-ldconfig.patch
+++ /dev/null
@@ -1,62 +0,0 @@
1--- elf/Makefile 13 Mar 2003 21:50:57 -0000 1.258
2+++ elf/Makefile 27 Mar 2003 20:36:07 -0000
3@@ -109,12 +109,13 @@
4
5 ifeq (yes,$(use-ldconfig))
6 ifeq (yes,$(build-shared))
7-others-static += ldconfig
8+#others-static += ldconfig
9 others += ldconfig
10 install-rootsbin += ldconfig
11
12 ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon
13 extra-objs += $(ldconfig-modules:=.o)
14+CPPFLAGS-readlib.c = -DNOT_IN_libc=1
15
16 # To find xmalloc.c and xstrdup.c
17 vpath %.c ../locale/programs
18--- elf/ldconfig.c 13 Jan 2003 08:53:14 -0000 1.31
19+++ elf/ldconfig.c 27 Mar 2003 20:36:09 -0000
20@@ -149,6 +149,9 @@
21 static int
22 is_hwcap_platform (const char *name)
23 {
24+#if 1
25+ return 0;
26+#else
27 int hwcap_idx = _dl_string_hwcap (name);
28
29 if (hwcap_idx != -1 && ((1 << hwcap_idx) & hwcap_mask))
30@@ -164,6 +167,7 @@
31 #endif
32
33 return 0;
34+#endif
35 }
36
37 /* Get hwcap (including platform) encoding of path. */
38@@ -175,6 +179,7 @@
39 uint64_t hwcap = 0;
40 uint64_t h;
41
42+#if 0
43 size_t len;
44
45 len = strlen (str);
46@@ -210,6 +215,7 @@
47 *ptr = '\0';
48 }
49
50+#endif
51 free (str);
52 return hwcap;
53 }
54--- elf/Versions.old 2004-06-26 13:18:35.000000000 +0100
55+++ elf/Versions 2004-06-26 14:41:09.000000000 +0100
56@@ -54,5 +54,6 @@
57 _dl_get_tls_static_info; _dl_allocate_tls_init;
58 _dl_tls_setup; _dl_rtld_di_serinfo;
59 _dl_make_stack_executable;
60+ _dl_cache_libcmp;
61 }
62 }
diff --git a/meta/packages/glibc/glibc-cvs/eabi-patch-1 b/meta/packages/glibc/glibc-cvs/eabi-patch-1
deleted file mode 100644
index 9b1fd408da..0000000000
--- a/meta/packages/glibc/glibc-cvs/eabi-patch-1
+++ /dev/null
@@ -1,88 +0,0 @@
1From libc-alpha-return-17227-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Tue Mar 22 15:57:25 2005
2Return-Path: <libc-alpha-return-17227-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
3Delivered-To: listarch-libc-alpha at sources dot redhat dot com
4Received: (qmail 12343 invoked by alias); 22 Mar 2005 15:57:24 -0000
5Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
6Precedence: bulk
7List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
8List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
9List-Post: <mailto:libc-alpha at sources dot redhat dot com>
10List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
11Sender: libc-alpha-owner at sources dot redhat dot com
12Delivered-To: mailing list libc-alpha at sources dot redhat dot com
13Received: (qmail 12264 invoked from network); 22 Mar 2005 15:57:19 -0000
14Received: from unknown (HELO nevyn.them.org) (66.93.172.17)
15 by sourceware dot org with SMTP; 22 Mar 2005 15:57:19 -0000
16Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
17 id 1DDll5-0006ip-R3; Tue, 22 Mar 2005 10:57:31 -0500
18Date: Tue, 22 Mar 2005 10:57:31 -0500
19From: Daniel Jacobowitz <drow at false dot org>
20To: libc-alpha at sources dot redhat dot com
21Cc: Phil Blundell <pb at reciva dot com>
22Subject: Common bits for the ARM EABI port
23Message-ID: <20050322155731.GA25613@nevyn.them.org>
24Mail-Followup-To: libc-alpha at sources dot redhat dot com,
25 Phil Blundell <pb at reciva dot com>
26Mime-Version: 1.0
27Content-Type: text/plain; charset=us-ascii
28Content-Disposition: inline
29User-Agent: Mutt/1.5.6+20040907i
30
31The changes to common files for the ARM EABI port; search the new directory,
32use GLIBC_2.4 as a base version, and generate ld-linux.so.3 (so that old and
33new ABI libraries can be installed on the same system, in case someone needs
34to do that). Generic ARM changes coming up next.
35
36I noticed that the "configure: Regenerated" messages are often left out of
37glibc changelogs; should I skip them?
38
39--
40Daniel Jacobowitz
41CodeSourcery, LLC
42
432005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
44
45 * configure.in: Add arm*-*-linux-gnueabi support. Remove
46 unused arm32 entry from $machine.
47 * configure: Regenerated.
48 * shlib-versions: Add arm*-*-linux-gnueabi.
49
50Index: glibc/configure.in
51===================================================================
52--- glibc.orig/configure.in 2005-03-18 17:10:34.000000000 -0500
53+++ glibc/configure.in 2005-03-21 10:04:41.000000000 -0500
54@@ -423,7 +423,12 @@ changequote(,)dnl
55 test -n "$base_machine" || case "$machine" in
56 a29k | am29000) base_machine=a29k machine=a29k ;;
57 alpha*) base_machine=alpha machine=alpha/$machine ;;
58-arm*) base_machine=arm machine=arm/arm32/$machine ;;
59+arm*) base_machine=arm
60+ case $config_os in
61+ linux-gnueabi) machine=arm/eabi/$machine ;;
62+ *) machine=arm/$machine ;;
63+ esac
64+ ;;
65 c3[012]) base_machine=cx0 machine=cx0/c30 ;;
66 c4[04]) base_machine=cx0 machine=cx0/c40 ;;
67 hppa*64*) base_machine=hppa machine=hppa/hppa64 ;;
68Index: glibc/shlib-versions
69===================================================================
70--- glibc.orig/shlib-versions 2005-02-13 21:53:05.000000000 -0500
71+++ glibc/shlib-versions 2005-03-21 10:06:54.000000000 -0500
72@@ -31,6 +31,7 @@ cris-.*-linux.* DEFAULT GLIBC_2.2
73 x86_64-.*-linux.* DEFAULT GLIBC_2.2.5
74 powerpc64-.*-linux.* DEFAULT GLIBC_2.3
75 .*-.*-gnu-gnu.* DEFAULT GLIBC_2.2.6
76+arm.*-.*-linux-gnueabi DEFAULT GLIBC_2.4
77
78 # Configuration WORDSIZE[32|64] Alternate configuration
79 # ------------- ---------- -----------------------
80@@ -80,6 +81,7 @@ i.86-.*-linux.* ld=ld-linux.so.2
81 sparc64-.*-linux.* ld=ld-linux.so.2 GLIBC_2.2
82 sparc.*-.*-linux.* ld=ld-linux.so.2
83 alpha.*-.*-linux.* ld=ld-linux.so.2
84+arm.*-.*-linux-gnueabi ld=ld-linux.so.3
85 arm.*-.*-linux.* ld=ld-linux.so.2
86 sh.*-.*-linux.* ld=ld-linux.so.2 GLIBC_2.2
87 ia64-.*-linux.* ld=ld-linux-ia64.so.2 GLIBC_2.2
88
diff --git a/meta/packages/glibc/glibc-cvs/eabi-patch-2 b/meta/packages/glibc/glibc-cvs/eabi-patch-2
deleted file mode 100644
index 955a9bb51f..0000000000
--- a/meta/packages/glibc/glibc-cvs/eabi-patch-2
+++ /dev/null
@@ -1,2446 +0,0 @@
1From libc-alpha-return-17231-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Tue Mar 22 17:39:38 2005
2Return-Path: <libc-alpha-return-17231-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
3Delivered-To: listarch-libc-alpha at sources dot redhat dot com
4Received: (qmail 15063 invoked by alias); 22 Mar 2005 17:39:38 -0000
5Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
6Precedence: bulk
7List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
8List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
9List-Post: <mailto:libc-alpha at sources dot redhat dot com>
10List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
11Sender: libc-alpha-owner at sources dot redhat dot com
12Delivered-To: mailing list libc-alpha at sources dot redhat dot com
13Received: (qmail 13714 invoked from network); 22 Mar 2005 17:38:53 -0000
14Received: from unknown (HELO nevyn.them.org) (66.93.172.17)
15 by sourceware dot org with SMTP; 22 Mar 2005 17:38:53 -0000
16Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
17 id 1DDnLP-00007R-0B; Tue, 22 Mar 2005 12:39:07 -0500
18Date: Tue, 22 Mar 2005 12:39:06 -0500
19From: Daniel Jacobowitz <drow at false dot org>
20To: libc-alpha at sources dot redhat dot com, Phil Blundell <pb at reciva dot com>
21Subject: Re: Remainder of ARM EABI support
22Message-ID: <20050322173906.GA316@nevyn.them.org>
23Mail-Followup-To: libc-alpha at sources dot redhat dot com,
24 Phil Blundell <pb at reciva dot com>
25References: <20050322162137.GA26662@nevyn.them.org>
26Mime-Version: 1.0
27Content-Type: text/plain; charset=us-ascii
28Content-Disposition: inline
29In-Reply-To: <20050322162137 dot GA26662 at nevyn dot them dot org>
30User-Agent: Mutt/1.5.6+20040907i
31
32On Tue, Mar 22, 2005 at 11:21:37AM -0500, Daniel Jacobowitz wrote:
33> This patch is the remaining pieces of ARM EABI support, the
34> arm*-*-linux-gnueabi target.
35>
36> Highlights of the new ABI compared to the old one:
37> - Eight byte stack alignment instead of four.
38> - VFP floating point support instead of FPA; there's actually hardware
39> which supports VFP...
40> - More standard structure layout. The old ABI (APCS) always rounded
41> structures up to 32-bit alignment even if they contained only chars;
42> it also aligned 64-bit fields to four bytes.
43> - Some types have been grown to accomodate modern ARM cores, particularly
44> jmp_buf.
45>
46> The EABI also defines some additional symbols that a C library has to
47> define, which allow "portable" ARM objects to be linked to multiple C
48> libraries even if certain implementation-defined constants differ.
49> They're added to ARM-specific files in libc_nonshared.a.
50>
51> Most of the contents of sysdeps/unix/sysv/linux/arm/eabi are wrappers for
52> syscalls whose types have changed between the old and new ABI. The kernel
53> developers are discussing an EABI syscall interface, but for now the swi
54> based syscalls take the same argument types they used to for APCS. Only
55> a handful of syscalls are affected.
56
57My track record is not very good this morning; I apologize. I sent the
58wrong version of the patch. This one includes a couple of VFP fixes
59left out of the last posting, and a complete changelog.
60
61--
62Daniel Jacobowitz
63CodeSourcery, LLC
64
652005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
66 Mark Mitchell <mark@codesourcery.com>
67 Paul Brook <paul@codesourcery.com>
68
69 * sysdeps/arm/eabi/Makefile, sysdeps/arm/eabi/Versions,
70 sysdeps/arm/eabi/aeabi_assert.c, sysdeps/arm/eabi/aeabi_atexit.c,
71 sysdeps/arm/eabi/aeabi_errno_addr.c, sysdeps/arm/eabi/aeabi_lcsts.c,
72 sysdeps/arm/eabi/aeabi_localeconv.c, sysdeps/arm/eabi/aeabi_math.c,
73 sysdeps/arm/eabi/aeabi_mb_cur_max.c,
74 sysdeps/arm/eabi/aeabi_sighandlers.S,
75 sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c,
76 sysdeps/arm/eabi/bits/huge_val.h, sysdeps/arm/eabi/bits/setjmp.h,
77 sysdeps/arm/eabi/find_exidx.c, sysdeps/arm/eabi/fpu/__longjmp.S,
78 sysdeps/arm/eabi/fpu/bits/fenv.h, sysdeps/arm/eabi/fpu/fclrexcpt.c,
79 sysdeps/arm/eabi/fpu/fegetround.c, sysdeps/arm/eabi/fpu/fesetenv.c,
80 sysdeps/arm/eabi/fpu/fesetround.c, sysdeps/arm/eabi/fpu/fpu_control.h,
81 sysdeps/arm/eabi/fpu/feholdexcpt.c,
82 sysdeps/arm/eabi/fpu/fraiseexcpt.c,
83 sysdeps/arm/eabi/fpu/setjmp.S,
84 sysdeps/unix/sysv/linux/arm/eabi/configure,
85 sysdeps/unix/sysv/linux/arm/eabi/configure.in,
86 sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c,
87 sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c,
88 sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c,
89 sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c,
90 sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h,
91 sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c,
92 sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c,
93 sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c,
94 sysdeps/unix/sysv/linux/arm/eabi/semop.c,
95 sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c,
96 sysdeps/unix/sysv/linux/arm/eabi/statfs64.c,
97 sysdeps/unix/sysv/linux/arm/eabi/uname.c,
98 sysdeps/unix/sysv/linux/arm/eabi/xstat64.c,
99 sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c,
100 sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h: New files.
101
102
103Index: glibc/sysdeps/arm/eabi/Makefile
104===================================================================
105--- /dev/null 1970-01-01 00:00:00.000000000 +0000
106+++ glibc/sysdeps/arm/eabi/Makefile 2005-03-22 11:53:10.049703870 -0500
107@@ -0,0 +1,15 @@
108+ifeq ($(subdir),csu)
109+aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math
110+aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \
111+ aeabi_mb_cur_max aeabi_atexit
112+
113+sysdep_routines += $(aeabi_constants) $(aeabi_routines)
114+static-only-routines += $(aeabi_constants) $(aeabi_routines)
115+endif
116+
117+ifeq ($(subdir),elf)
118+sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx
119+shared-only-routines += aeabi_unwind_cpp_pr1
120+sysdep-rtld-routines += aeabi_unwind_cpp_pr1
121+endif
122+
123Index: glibc/sysdeps/arm/eabi/Versions
124===================================================================
125--- /dev/null 1970-01-01 00:00:00.000000000 +0000
126+++ glibc/sysdeps/arm/eabi/Versions 2005-03-22 11:53:10.049703870 -0500
127@@ -0,0 +1,6 @@
128+libc {
129+ GLIBC_2.4 {
130+ # Helper routines
131+ __gnu_Unwind_Find_exidx;
132+ }
133+}
134Index: glibc/sysdeps/arm/eabi/aeabi_assert.c
135===================================================================
136--- /dev/null 1970-01-01 00:00:00.000000000 +0000
137+++ glibc/sysdeps/arm/eabi/aeabi_assert.c 2005-03-22 11:53:10.049703870 -0500
138@@ -0,0 +1,27 @@
139+/* Copyright (C) 2004 Free Software Foundation, Inc.
140+ This file is part of the GNU C Library.
141+
142+ The GNU C Library is free software; you can redistribute it and/or
143+ modify it under the terms of the GNU Lesser General Public
144+ License as published by the Free Software Foundation; either
145+ version 2.1 of the License, or (at your option) any later version.
146+
147+ The GNU C Library is distributed in the hope that it will be useful,
148+ but WITHOUT ANY WARRANTY; without even the implied warranty of
149+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
150+ Lesser General Public License for more details.
151+
152+ You should have received a copy of the GNU Lesser General Public
153+ License along with the GNU C Library; if not, write to the Free
154+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
155+ 02111-1307 USA. */
156+
157+#include <assert.h>
158+#include <stdlib.h>
159+
160+void attribute_hidden
161+__aeabi_assert (const char *assertion, const char *file,
162+ unsigned int line)
163+{
164+ __assert_fail (assertion, file, line, NULL);
165+}
166Index: glibc/sysdeps/arm/eabi/aeabi_atexit.c
167===================================================================
168--- /dev/null 1970-01-01 00:00:00.000000000 +0000
169+++ glibc/sysdeps/arm/eabi/aeabi_atexit.c 2005-03-22 11:53:10.050703627 -0500
170@@ -0,0 +1,28 @@
171+/* Copyright (C) 2005 Free Software Foundation, Inc.
172+ This file is part of the GNU C Library.
173+
174+ The GNU C Library is free software; you can redistribute it and/or
175+ modify it under the terms of the GNU Lesser General Public
176+ License as published by the Free Software Foundation; either
177+ version 2.1 of the License, or (at your option) any later version.
178+
179+ The GNU C Library is distributed in the hope that it will be useful,
180+ but WITHOUT ANY WARRANTY; without even the implied warranty of
181+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
182+ Lesser General Public License for more details.
183+
184+ You should have received a copy of the GNU Lesser General Public
185+ License along with the GNU C Library; if not, write to the Free
186+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
187+ 02111-1307 USA. */
188+
189+#include <stdlib.h>
190+
191+/* Register a function to be called by exit or when a shared library
192+ is unloaded. This routine is like __cxa_atexit, but uses the
193+ calling sequence required by the ARM EABI. */
194+int attribute_hidden
195+__aeabi_atexit (void *arg, void (*func) (void *), void *d)
196+{
197+ return __cxa_atexit (func, arg, d);
198+}
199Index: glibc/sysdeps/arm/eabi/aeabi_errno_addr.c
200===================================================================
201--- /dev/null 1970-01-01 00:00:00.000000000 +0000
202+++ glibc/sysdeps/arm/eabi/aeabi_errno_addr.c 2005-03-22 11:53:10.050703627 -0500
203@@ -0,0 +1,26 @@
204+/* Copyright (C) 2004 Free Software Foundation, Inc.
205+ This file is part of the GNU C Library.
206+
207+ The GNU C Library is free software; you can redistribute it and/or
208+ modify it under the terms of the GNU Lesser General Public
209+ License as published by the Free Software Foundation; either
210+ version 2.1 of the License, or (at your option) any later version.
211+
212+ The GNU C Library is distributed in the hope that it will be useful,
213+ but WITHOUT ANY WARRANTY; without even the implied warranty of
214+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
215+ Lesser General Public License for more details.
216+
217+ You should have received a copy of the GNU Lesser General Public
218+ License along with the GNU C Library; if not, write to the Free
219+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
220+ 02111-1307 USA. */
221+
222+#include <errno.h>
223+
224+attribute_hidden
225+volatile int *
226+__aeabi_errno_addr (void)
227+{
228+ return &errno;
229+}
230Index: glibc/sysdeps/arm/eabi/aeabi_lcsts.c
231===================================================================
232--- /dev/null 1970-01-01 00:00:00.000000000 +0000
233+++ glibc/sysdeps/arm/eabi/aeabi_lcsts.c 2005-03-22 11:53:10.050703627 -0500
234@@ -0,0 +1,67 @@
235+/* Link-time constants for ARM EABI.
236+ Copyright (C) 2005 Free Software Foundation, Inc.
237+ This file is part of the GNU C Library.
238+
239+ The GNU C Library is free software; you can redistribute it and/or
240+ modify it under the terms of the GNU Lesser General Public
241+ License as published by the Free Software Foundation; either
242+ version 2.1 of the License, or (at your option) any later version.
243+
244+ The GNU C Library is distributed in the hope that it will be useful,
245+ but WITHOUT ANY WARRANTY; without even the implied warranty of
246+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
247+ Lesser General Public License for more details.
248+
249+ You should have received a copy of the GNU Lesser General Public
250+ License along with the GNU C Library; if not, write to the Free
251+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
252+ 02111-1307 USA. */
253+
254+/* The ARM EABI requires that we provide ISO compile-time constants as
255+ link-time constants. Some portable applications may reference these. */
256+
257+#include <errno.h>
258+#include <limits.h>
259+#include <locale.h>
260+#include <setjmp.h>
261+#include <signal.h>
262+#include <stdio.h>
263+#include <time.h>
264+
265+#define eabi_constant2(X,Y) const int __aeabi_##X attribute_hidden = Y
266+#define eabi_constant(X) const int __aeabi_##X attribute_hidden = X
267+
268+eabi_constant (EDOM);
269+eabi_constant (ERANGE);
270+eabi_constant (EILSEQ);
271+
272+eabi_constant (MB_LEN_MAX);
273+
274+eabi_constant (LC_COLLATE);
275+eabi_constant (LC_CTYPE);
276+eabi_constant (LC_MONETARY);
277+eabi_constant (LC_NUMERIC);
278+eabi_constant (LC_TIME);
279+eabi_constant (LC_ALL);
280+
281+/* The value of __aeabi_JMP_BUF_SIZE is the number of doublewords in a
282+ jmp_buf. */
283+eabi_constant2 (JMP_BUF_SIZE, sizeof (jmp_buf) / 8);
284+
285+eabi_constant (SIGABRT);
286+eabi_constant (SIGFPE);
287+eabi_constant (SIGILL);
288+eabi_constant (SIGINT);
289+eabi_constant (SIGSEGV);
290+eabi_constant (SIGTERM);
291+
292+eabi_constant2 (IOFBF, _IOFBF);
293+eabi_constant2 (IOLBF, _IOLBF);
294+eabi_constant2 (IONBF, _IONBF);
295+eabi_constant (BUFSIZ);
296+eabi_constant (FOPEN_MAX);
297+eabi_constant (TMP_MAX);
298+eabi_constant (FILENAME_MAX);
299+eabi_constant (L_tmpnam);
300+
301+eabi_constant (CLOCKS_PER_SEC);
302Index: glibc/sysdeps/arm/eabi/aeabi_localeconv.c
303===================================================================
304--- /dev/null 1970-01-01 00:00:00.000000000 +0000
305+++ glibc/sysdeps/arm/eabi/aeabi_localeconv.c 2005-03-22 11:53:10.050703627 -0500
306@@ -0,0 +1,26 @@
307+/* Copyright (C) 2004 Free Software Foundation, Inc.
308+ This file is part of the GNU C Library.
309+
310+ The GNU C Library is free software; you can redistribute it and/or
311+ modify it under the terms of the GNU Lesser General Public
312+ License as published by the Free Software Foundation; either
313+ version 2.1 of the License, or (at your option) any later version.
314+
315+ The GNU C Library is distributed in the hope that it will be useful,
316+ but WITHOUT ANY WARRANTY; without even the implied warranty of
317+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
318+ Lesser General Public License for more details.
319+
320+ You should have received a copy of the GNU Lesser General Public
321+ License along with the GNU C Library; if not, write to the Free
322+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
323+ 02111-1307 USA. */
324+
325+#include <locale.h>
326+
327+attribute_hidden
328+struct lconv *
329+__aeabi_localeconv (void)
330+{
331+ return localeconv ();
332+}
333Index: glibc/sysdeps/arm/eabi/aeabi_math.c
334===================================================================
335--- /dev/null 1970-01-01 00:00:00.000000000 +0000
336+++ glibc/sysdeps/arm/eabi/aeabi_math.c 2005-03-22 11:53:10.050703627 -0500
337@@ -0,0 +1,25 @@
338+/* Copyright (C) 2004 Free Software Foundation, Inc.
339+ This file is part of the GNU C Library.
340+
341+ The GNU C Library is free software; you can redistribute it and/or
342+ modify it under the terms of the GNU Lesser General Public
343+ License as published by the Free Software Foundation; either
344+ version 2.1 of the License, or (at your option) any later version.
345+
346+ The GNU C Library is distributed in the hope that it will be useful,
347+ but WITHOUT ANY WARRANTY; without even the implied warranty of
348+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
349+ Lesser General Public License for more details.
350+
351+ You should have received a copy of the GNU Lesser General Public
352+ License along with the GNU C Library; if not, write to the Free
353+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
354+ 02111-1307 USA. */
355+
356+#include <math.h>
357+
358+const double __aeabi_HUGE_VAL attribute_hidden = HUGE_VAL;
359+const long double __aeabi_HUGE_VALL attribute_hidden = HUGE_VALL;
360+const float __aeabi_HUGE_VALF attribute_hidden = HUGE_VALF;
361+const float __aeabi_INFINITY attribute_hidden = INFINITY;
362+const float __aeabi_NAN attribute_hidden = NAN;
363Index: glibc/sysdeps/arm/eabi/aeabi_mb_cur_max.c
364===================================================================
365--- /dev/null 1970-01-01 00:00:00.000000000 +0000
366+++ glibc/sysdeps/arm/eabi/aeabi_mb_cur_max.c 2005-03-22 11:53:10.051703385 -0500
367@@ -0,0 +1,28 @@
368+/* Copyright (C) 2004 Free Software Foundation, Inc.
369+ This file is part of the GNU C Library.
370+
371+ The GNU C Library is free software; you can redistribute it and/or
372+ modify it under the terms of the GNU Lesser General Public
373+ License as published by the Free Software Foundation; either
374+ version 2.1 of the License, or (at your option) any later version.
375+
376+ The GNU C Library is distributed in the hope that it will be useful,
377+ but WITHOUT ANY WARRANTY; without even the implied warranty of
378+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
379+ Lesser General Public License for more details.
380+
381+ You should have received a copy of the GNU Lesser General Public
382+ License along with the GNU C Library; if not, write to the Free
383+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
384+ 02111-1307 USA. */
385+
386+#include <langinfo.h>
387+#include <locale.h>
388+#include <stdlib.h>
389+#include <locale/localeinfo.h>
390+
391+int attribute_hidden
392+__aeabi_MB_CUR_MAX (void)
393+{
394+ return MB_CUR_MAX;
395+}
396Index: glibc/sysdeps/arm/eabi/aeabi_sighandlers.S
397===================================================================
398--- /dev/null 1970-01-01 00:00:00.000000000 +0000
399+++ glibc/sysdeps/arm/eabi/aeabi_sighandlers.S 2005-03-22 11:53:10.051703385 -0500
400@@ -0,0 +1,37 @@
401+/* Link-time constants for ARM EABI - signal handlers.
402+ Copyright (C) 2005 Free Software Foundation, Inc.
403+ This file is part of the GNU C Library.
404+
405+ The GNU C Library is free software; you can redistribute it and/or
406+ modify it under the terms of the GNU Lesser General Public
407+ License as published by the Free Software Foundation; either
408+ version 2.1 of the License, or (at your option) any later version.
409+
410+ The GNU C Library is distributed in the hope that it will be useful,
411+ but WITHOUT ANY WARRANTY; without even the implied warranty of
412+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
413+ Lesser General Public License for more details.
414+
415+ You should have received a copy of the GNU Lesser General Public
416+ License along with the GNU C Library; if not, write to the Free
417+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
418+ 02111-1307 USA. */
419+
420+/* The ARM EABI defines these as "functions". */
421+
422+#include <sysdep.h>
423+
424+ .global __aeabi_SIG_DFL
425+ .hidden __aeabi_SIG_DFL
426+ .type __aeabi_SIG_DFL, %function
427+ .set __aeabi_SIG_DFL, 0
428+
429+ .global __aeabi_SIG_IGN
430+ .hidden __aeabi_SIG_IGN
431+ .type __aeabi_SIG_IGN, %function
432+ .set __aeabi_SIG_IGN, 1
433+
434+ .global __aeabi_SIG_ERR
435+ .hidden __aeabi_SIG_ERR
436+ .type __aeabi_SIG_ERR, %function
437+ .set __aeabi_SIG_ERR, -1
438Index: glibc/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c
439===================================================================
440--- /dev/null 1970-01-01 00:00:00.000000000 +0000
441+++ glibc/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c 2005-03-22 11:53:10.051703385 -0500
442@@ -0,0 +1,28 @@
443+/* Copyright (C) 2005 Free Software Foundation, Inc.
444+ This file is part of the GNU C Library.
445+
446+ The GNU C Library is free software; you can redistribute it and/or
447+ modify it under the terms of the GNU Lesser General Public
448+ License as published by the Free Software Foundation; either
449+ version 2.1 of the License, or (at your option) any later version.
450+
451+ The GNU C Library is distributed in the hope that it will be useful,
452+ but WITHOUT ANY WARRANTY; without even the implied warranty of
453+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
454+ Lesser General Public License for more details.
455+
456+ You should have received a copy of the GNU Lesser General Public
457+ License along with the GNU C Library; if not, write to the Free
458+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
459+ 02111-1307 USA. */
460+
461+/* Because some objects in ld.so and libc.so are built with
462+ -fexceptions, we end up with references to this personality
463+ routine. However, these libraries are not linked against
464+ libgcc_eh.a, so we need a dummy definition. This routine will
465+ never actually be called. */
466+
467+void
468+__aeabi_unwind_cpp_pr1 (void)
469+{
470+}
471Index: glibc/sysdeps/arm/eabi/bits/huge_val.h
472===================================================================
473--- /dev/null 1970-01-01 00:00:00.000000000 +0000
474+++ glibc/sysdeps/arm/eabi/bits/huge_val.h 2005-03-22 11:53:10.051703385 -0500
475@@ -0,0 +1,55 @@
476+/* `HUGE_VAL' constant for IEEE 754 machines (where it is infinity).
477+ Used by <stdlib.h> and <math.h> functions for overflow.
478+ Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000, 2004
479+ Free Software Foundation, Inc.
480+ This file is part of the GNU C Library.
481+
482+ The GNU C Library is free software; you can redistribute it and/or
483+ modify it under the terms of the GNU Lesser General Public
484+ License as published by the Free Software Foundation; either
485+ version 2.1 of the License, or (at your option) any later version.
486+
487+ The GNU C Library is distributed in the hope that it will be useful,
488+ but WITHOUT ANY WARRANTY; without even the implied warranty of
489+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
490+ Lesser General Public License for more details.
491+
492+ You should have received a copy of the GNU Lesser General Public
493+ License along with the GNU C Library; if not, write to the Free
494+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
495+ 02111-1307 USA. */
496+
497+#ifndef _MATH_H
498+# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
499+#endif
500+
501+/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
502+
503+#if __GNUC_PREREQ(3,3)
504+# define HUGE_VAL (__builtin_huge_val())
505+#elif __GNUC_PREREQ(2,96)
506+# define HUGE_VAL (__extension__ 0x1.0p2047)
507+#elif defined __GNUC__
508+
509+# define HUGE_VAL \
510+ (__extension__ \
511+ ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \
512+ { __l: 0x7ff0000000000000ULL }).__d)
513+
514+#else /* not GCC */
515+
516+# include <endian.h>
517+
518+typedef union { unsigned char __c[8]; double __d; } __huge_val_t;
519+
520+# if __BYTE_ORDER == __BIG_ENDIAN
521+# define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
522+# endif
523+# if __BYTE_ORDER == __LITTLE_ENDIAN
524+# define __HUGE_VAL_bytes { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
525+# endif
526+
527+static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
528+# define HUGE_VAL (__huge_val.__d)
529+
530+#endif /* GCC. */
531Index: glibc/sysdeps/arm/eabi/bits/setjmp.h
532===================================================================
533--- /dev/null 1970-01-01 00:00:00.000000000 +0000
534+++ glibc/sysdeps/arm/eabi/bits/setjmp.h 2005-03-22 11:53:10.052703143 -0500
535@@ -0,0 +1,45 @@
536+/* Copyright (C) 2004 Free Software Foundation, Inc.
537+ This file is part of the GNU C Library.
538+
539+ The GNU C Library is free software; you can redistribute it and/or
540+ modify it under the terms of the GNU Lesser General Public
541+ License as published by the Free Software Foundation; either
542+ version 2.1 of the License, or (at your option) any later version.
543+
544+ The GNU C Library is distributed in the hope that it will be useful,
545+ but WITHOUT ANY WARRANTY; without even the implied warranty of
546+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
547+ Lesser General Public License for more details.
548+
549+ You should have received a copy of the GNU Lesser General Public
550+ License along with the GNU C Library; if not, write to the Free
551+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
552+ 02111-1307 USA. */
553+
554+/* Define the machine-dependent type `jmp_buf'. ARM EABI version. */
555+
556+#ifndef _BITS_SETJMP_H
557+#define _BITS_SETJMP_H 1
558+
559+#if !defined _SETJMP_H && !defined _PTHREAD_H
560+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
561+#endif
562+
563+#ifndef _ASM
564+/* The exact set of registers saved may depend on the particular core
565+ in use, as some coprocessor registers may need to be saved. The C
566+ Library ABI requires that the buffer be 8-byte aligned, and
567+ recommends that the buffer contain 64 words. The first 28 words
568+ are occupied by v1-v6, sl, fp, sp, pc, d8-d15, and fpscr. (Note
569+ that d8-15 require 17 words, due to the use of fstmx.) */
570+typedef int __jmp_buf[64] __attribute__((aligned (8)));
571+#endif
572+
573+#define __JMP_BUF_SP 8
574+
575+/* Test if longjmp to JMPBUF would unwind the frame
576+ containing a local variable at ADDRESS. */
577+#define _JMPBUF_UNWINDS(jmpbuf, address) \
578+ ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
579+
580+#endif
581Index: glibc/sysdeps/arm/eabi/find_exidx.c
582===================================================================
583--- /dev/null 1970-01-01 00:00:00.000000000 +0000
584+++ glibc/sysdeps/arm/eabi/find_exidx.c 2005-03-22 11:53:10.052703143 -0500
585@@ -0,0 +1,80 @@
586+/* Copyright (C) 2005 Free Software Foundation, Inc.
587+ This file is part of the GNU C Library.
588+
589+ The GNU C Library is free software; you can redistribute it and/or
590+ modify it under the terms of the GNU Lesser General Public
591+ License as published by the Free Software Foundation; either
592+ version 2.1 of the License, or (at your option) any later version.
593+
594+ The GNU C Library is distributed in the hope that it will be useful,
595+ but WITHOUT ANY WARRANTY; without even the implied warranty of
596+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
597+ Lesser General Public License for more details.
598+
599+ You should have received a copy of the GNU Lesser General Public
600+ License along with the GNU C Library; if not, write to the Free
601+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
602+ 02111-1307 USA. */
603+
604+#include <link.h>
605+#include <unwind.h>
606+
607+struct unw_eh_callback_data
608+{
609+ _Unwind_Ptr pc;
610+ _Unwind_Ptr exidx_start;
611+ int exidx_len;
612+};
613+
614+
615+/* Callback to determins if the PC lies within an object, and remember the
616+ location of the exception index table if it does. */
617+
618+static int
619+find_exidx_callback (struct dl_phdr_info * info, size_t size, void * ptr)
620+{
621+ struct unw_eh_callback_data * data;
622+ const ElfW(Phdr) *phdr;
623+ int i;
624+ int match;
625+ _Unwind_Ptr load_base;
626+
627+ data = (struct unw_eh_callback_data *) ptr;
628+ load_base = info->dlpi_addr;
629+ phdr = info->dlpi_phdr;
630+
631+ match = 0;
632+ for (i = info->dlpi_phnum; i > 0; i--, phdr++)
633+ {
634+ if (phdr->p_type == PT_LOAD)
635+ {
636+ _Unwind_Ptr vaddr = phdr->p_vaddr + load_base;
637+ if (data->pc >= vaddr && data->pc < vaddr + phdr->p_memsz)
638+ match = 1;
639+ }
640+ else if (phdr->p_type == PT_ARM_EXIDX)
641+ {
642+ data->exidx_start = (_Unwind_Ptr) (phdr->p_vaddr + load_base);
643+ data->exidx_len = phdr->p_memsz;
644+ }
645+ }
646+
647+ return match;
648+}
649+
650+
651+/* Find the exception index table containing PC. */
652+
653+_Unwind_Ptr
654+__gnu_Unwind_Find_exidx (_Unwind_Ptr pc, int * pcount)
655+{
656+ struct unw_eh_callback_data data;
657+
658+ data.pc = pc;
659+ data.exidx_start = 0;
660+ if (dl_iterate_phdr (find_exidx_callback, &data) <= 0)
661+ return 0;
662+
663+ *pcount = data.exidx_len / 8;
664+ return data.exidx_start;
665+}
666Index: glibc/sysdeps/arm/eabi/fpu/__longjmp.S
667===================================================================
668--- /dev/null 1970-01-01 00:00:00.000000000 +0000
669+++ glibc/sysdeps/arm/eabi/fpu/__longjmp.S 2005-03-22 11:53:10.052703143 -0500
670@@ -0,0 +1,43 @@
671+/* longjmp for ARM.
672+ Copyright (C) 2004 Free Software Foundation, Inc.
673+ This file is part of the GNU C Library.
674+
675+ The GNU C Library is free software; you can redistribute it and/or
676+ modify it under the terms of the GNU Lesser General Public
677+ License as published by the Free Software Foundation; either
678+ version 2.1 of the License, or (at your option) any later version.
679+
680+ The GNU C Library is distributed in the hope that it will be useful,
681+ but WITHOUT ANY WARRANTY; without even the implied warranty of
682+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
683+ Lesser General Public License for more details.
684+
685+ You should have received a copy of the GNU Lesser General Public
686+ License along with the GNU C Library; if not, write to the Free
687+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
688+ 02111-1307 USA. */
689+
690+#include <sysdep.h>
691+#define _SETJMP_H
692+#define _ASM
693+#include <bits/setjmp.h>
694+
695+/* __longjmp(jmpbuf, val) */
696+
697+ENTRY (__longjmp)
698+ mov ip, r0 /* save jmp_buf pointer */
699+
700+ movs r0, r1 /* get the return value in place */
701+ moveq r0, #1 /* can't let setjmp() return zero! */
702+
703+ /* Restore the integer registers. */
704+ LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr})
705+
706+ /* Restore the VFP registers. */
707+ fldmiax ip!, {d8-d15}
708+ /* Restore the floating-point status register. */
709+ ldr r1, [ip], #4
710+ fmxr fpscr, r1
711+
712+ DO_RET(lr)
713+END (__longjmp)
714Index: glibc/sysdeps/arm/eabi/fpu/bits/fenv.h
715===================================================================
716--- /dev/null 1970-01-01 00:00:00.000000000 +0000
717+++ glibc/sysdeps/arm/eabi/fpu/bits/fenv.h 2005-03-22 12:34:55.511467536 -0500
718@@ -0,0 +1,74 @@
719+/* Copyright (C) 2004 Free Software Foundation, Inc.
720+ This file is part of the GNU C Library.
721+
722+ The GNU C Library is free software; you can redistribute it and/or
723+ modify it under the terms of the GNU Lesser General Public
724+ License as published by the Free Software Foundation; either
725+ version 2.1 of the License, or (at your option) any later version.
726+
727+ The GNU C Library is distributed in the hope that it will be useful,
728+ but WITHOUT ANY WARRANTY; without even the implied warranty of
729+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
730+ Lesser General Public License for more details.
731+
732+ You should have received a copy of the GNU Lesser General Public
733+ License along with the GNU C Library; if not, write to the Free
734+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
735+ 02111-1307 USA. */
736+
737+#ifndef _FENV_H
738+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
739+#endif
740+
741+/* Define bits representing exceptions in the FPU status word. */
742+enum
743+ {
744+ FE_INVALID = 1,
745+#define FE_INVALID FE_INVALID
746+ FE_DIVBYZERO = 2,
747+#define FE_DIVBYZERO FE_DIVBYZERO
748+ FE_OVERFLOW = 4,
749+#define FE_OVERFLOW FE_OVERFLOW
750+ FE_UNDERFLOW = 8,
751+#define FE_UNDERFLOW FE_UNDERFLOW
752+ FE_INEXACT = 16,
753+#define FE_INEXACT FE_INEXACT
754+ };
755+
756+/* Amount to shift by to convert an exception to a mask bit. */
757+#define FE_EXCEPT_SHIFT 8
758+
759+/* All supported exceptions. */
760+#define FE_ALL_EXCEPT \
761+ (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
762+
763+/* VFP supports all of the four defined rounding modes. */
764+enum
765+ {
766+ FE_TONEAREST = 0,
767+#define FE_TONEAREST FE_TONEAREST
768+ FE_UPWARD = 0x400000,
769+#define FE_UPWARD FE_UPWARD
770+ FE_DOWNWARD = 0x800000,
771+#define FE_DOWNWARD FE_DOWNWARD
772+ FE_TOWARDZERO = 0xc00000
773+#define FE_TOWARDZERO FE_TOWARDZERO
774+ };
775+
776+/* Type representing exception flags. */
777+typedef unsigned int fexcept_t;
778+
779+/* Type representing floating-point environment. */
780+typedef struct
781+ {
782+ unsigned int __cw;
783+ }
784+fenv_t;
785+
786+/* If the default argument is used we use this value. */
787+#define FE_DFL_ENV ((fenv_t *) -1l)
788+
789+#ifdef __USE_GNU
790+/* Floating-point environment where none of the exceptions are masked. */
791+# define FE_NOMASK_ENV ((__const fenv_t *) -2)
792+#endif
793Index: glibc/sysdeps/arm/eabi/fpu/fclrexcpt.c
794===================================================================
795--- /dev/null 1970-01-01 00:00:00.000000000 +0000
796+++ glibc/sysdeps/arm/eabi/fpu/fclrexcpt.c 2005-03-22 11:53:10.053702900 -0500
797@@ -0,0 +1,50 @@
798+/* Clear given exceptions in current floating-point environment.
799+ Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc.
800+ This file is part of the GNU C Library.
801+
802+ The GNU C Library is free software; you can redistribute it and/or
803+ modify it under the terms of the GNU Lesser General Public
804+ License as published by the Free Software Foundation; either
805+ version 2.1 of the License, or (at your option) any later version.
806+
807+ The GNU C Library is distributed in the hope that it will be useful,
808+ but WITHOUT ANY WARRANTY; without even the implied warranty of
809+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
810+ Lesser General Public License for more details.
811+
812+ You should have received a copy of the GNU Lesser General Public
813+ License along with the GNU C Library; if not, write to the Free
814+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
815+ 02111-1307 USA. */
816+
817+#include <fenv.h>
818+#include <fpu_control.h>
819+
820+int
821+__feclearexcept (int excepts)
822+{
823+ unsigned long int temp;
824+
825+ /* Mask out unsupported bits/exceptions. */
826+ excepts &= FE_ALL_EXCEPT;
827+
828+ /* Get the current floating point status. */
829+ _FPU_GETCW (temp);
830+
831+ /* Clear the relevant bits. */
832+ temp = (temp & ~FE_ALL_EXCEPT) | (temp & FE_ALL_EXCEPT & ~excepts);
833+
834+ /* Put the new data in effect. */
835+ _FPU_SETCW (temp);
836+
837+ /* Success. */
838+ return 0;
839+}
840+
841+#include <shlib-compat.h>
842+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
843+strong_alias (__feclearexcept, __old_feclearexcept)
844+compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
845+#endif
846+
847+versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
848Index: glibc/sysdeps/arm/eabi/fpu/fegetround.c
849===================================================================
850--- /dev/null 1970-01-01 00:00:00.000000000 +0000
851+++ glibc/sysdeps/arm/eabi/fpu/fegetround.c 2005-03-22 11:53:10.053702900 -0500
852@@ -0,0 +1,32 @@
853+/* Return current rounding direction.
854+ Copyright (C) 2004 Free Software Foundation, Inc.
855+ This file is part of the GNU C Library.
856+
857+ The GNU C Library is free software; you can redistribute it and/or
858+ modify it under the terms of the GNU Lesser General Public
859+ License as published by the Free Software Foundation; either
860+ version 2.1 of the License, or (at your option) any later version.
861+
862+ The GNU C Library is distributed in the hope that it will be useful,
863+ but WITHOUT ANY WARRANTY; without even the implied warranty of
864+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
865+ Lesser General Public License for more details.
866+
867+ You should have received a copy of the GNU Lesser General Public
868+ License along with the GNU C Library; if not, write to the Free
869+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
870+ 02111-1307 USA. */
871+
872+#include <fenv.h>
873+#include <fpu_control.h>
874+
875+int
876+fegetround (void)
877+{
878+ unsigned int temp;
879+
880+ /* Get the current environment. */
881+ _FPU_GETCW (temp);
882+
883+ return temp & FE_TOWARDZERO;
884+}
885Index: glibc/sysdeps/arm/eabi/fpu/fesetenv.c
886===================================================================
887--- /dev/null 1970-01-01 00:00:00.000000000 +0000
888+++ glibc/sysdeps/arm/eabi/fpu/fesetenv.c 2005-03-22 12:34:55.521465156 -0500
889@@ -0,0 +1,46 @@
890+/* Install given floating-point environment.
891+ Copyright (C) 2004 Free Software Foundation, Inc.
892+ This file is part of the GNU C Library.
893+
894+ The GNU C Library is free software; you can redistribute it and/or
895+ modify it under the terms of the GNU Lesser General Public
896+ License as published by the Free Software Foundation; either
897+ version 2.1 of the License, or (at your option) any later version.
898+
899+ The GNU C Library is distributed in the hope that it will be useful,
900+ but WITHOUT ANY WARRANTY; without even the implied warranty of
901+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
902+ Lesser General Public License for more details.
903+
904+ You should have received a copy of the GNU Lesser General Public
905+ License along with the GNU C Library; if not, write to the Free
906+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
907+ 02111-1307 USA. */
908+
909+#include <fenv.h>
910+#include <fpu_control.h>
911+
912+int
913+__fesetenv (const fenv_t *envp)
914+{
915+ unsigned int temp;
916+
917+ _FPU_GETCW (temp);
918+ temp &= _FPU_RESERVED;
919+
920+ if (envp == FE_DFL_ENV)
921+ temp |= _FPU_DEFAULT;
922+ else if (envp == FE_NOMASK_ENV)
923+ temp |= _FPU_IEEE;
924+ else
925+ temp |= envp->__cw & ~_FPU_RESERVED;
926+
927+ _FPU_SETCW (temp);
928+
929+ /* Success. */
930+ return 0;
931+}
932+
933+#include <shlib-compat.h>
934+libm_hidden_ver (__fesetenv, fesetenv)
935+versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2);
936Index: glibc/sysdeps/arm/eabi/fpu/fesetround.c
937===================================================================
938--- /dev/null 1970-01-01 00:00:00.000000000 +0000
939+++ glibc/sysdeps/arm/eabi/fpu/fesetround.c 2005-03-22 11:53:10.053702900 -0500
940@@ -0,0 +1,41 @@
941+/* Set current rounding direction.
942+ Copyright (C) 2004 Free Software Foundation, Inc.
943+ This file is part of the GNU C Library.
944+
945+ The GNU C Library is free software; you can redistribute it and/or
946+ modify it under the terms of the GNU Lesser General Public
947+ License as published by the Free Software Foundation; either
948+ version 2.1 of the License, or (at your option) any later version.
949+
950+ The GNU C Library is distributed in the hope that it will be useful,
951+ but WITHOUT ANY WARRANTY; without even the implied warranty of
952+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
953+ Lesser General Public License for more details.
954+
955+ You should have received a copy of the GNU Lesser General Public
956+ License along with the GNU C Library; if not, write to the Free
957+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
958+ 02111-1307 USA. */
959+
960+#include <fenv.h>
961+#include <fpu_control.h>
962+
963+int
964+fesetround (int round)
965+{
966+ fpu_control_t temp;
967+
968+ switch (round)
969+ {
970+ case FE_TONEAREST:
971+ case FE_UPWARD:
972+ case FE_DOWNWARD:
973+ case FE_TOWARDZERO:
974+ _FPU_GETCW (temp);
975+ temp = (temp & ~FE_TOWARDZERO) | round;
976+ _FPU_SETCW (temp);
977+ return 0;
978+ default:
979+ return 1;
980+ }
981+}
982Index: glibc/sysdeps/arm/eabi/fpu/fpu_control.h
983===================================================================
984--- /dev/null 1970-01-01 00:00:00.000000000 +0000
985+++ glibc/sysdeps/arm/eabi/fpu/fpu_control.h 2005-03-22 12:34:55.521465156 -0500
986@@ -0,0 +1,47 @@
987+/* FPU control word definitions. ARM VFP version.
988+ Copyright (C) 2004 Free Software Foundation, Inc.
989+ This file is part of the GNU C Library.
990+
991+ The GNU C Library is free software; you can redistribute it and/or
992+ modify it under the terms of the GNU Lesser General Public
993+ License as published by the Free Software Foundation; either
994+ version 2.1 of the License, or (at your option) any later version.
995+
996+ The GNU C Library is distributed in the hope that it will be useful,
997+ but WITHOUT ANY WARRANTY; without even the implied warranty of
998+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
999+ Lesser General Public License for more details.
1000+
1001+ You should have received a copy of the GNU Lesser General Public
1002+ License along with the GNU C Library; if not, write to the Free
1003+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1004+ 02111-1307 USA. */
1005+
1006+#ifndef _FPU_CONTROL_H
1007+#define _FPU_CONTROL_H
1008+
1009+/* masking of interrupts */
1010+#define _FPU_MASK_IM 0x00000100 /* invalid operation */
1011+#define _FPU_MASK_ZM 0x00000200 /* divide by zero */
1012+#define _FPU_MASK_OM 0x00000400 /* overflow */
1013+#define _FPU_MASK_UM 0x00000800 /* underflow */
1014+#define _FPU_MASK_PM 0x00001000 /* inexact */
1015+
1016+/* Some bits in the FPSCR are not yet defined. They must be preserved when
1017+ modifying the contents. */
1018+#define _FPU_RESERVED 0x0e08e0e0
1019+#define _FPU_DEFAULT 0x00000000
1020+/* Default + exceptions enabled. */
1021+#define _FPU_IEEE (_FPU_DEFAULT | 0x00001f00)
1022+
1023+/* Type of the control word. */
1024+typedef unsigned int fpu_control_t;
1025+
1026+/* Macros for accessing the hardware control word. */
1027+#define _FPU_GETCW(cw) __asm__ __volatile__ ("fmrx %0, fpscr" : "=r" (cw))
1028+#define _FPU_SETCW(cw) __asm__ __volatile__ ("fmxr fpscr, %0" : : "r" (cw))
1029+
1030+/* Default control word set at startup. */
1031+extern fpu_control_t __fpu_control;
1032+
1033+#endif /* _FPU_CONTROL_H */
1034Index: glibc/sysdeps/arm/eabi/fpu/setjmp.S
1035===================================================================
1036--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1037+++ glibc/sysdeps/arm/eabi/fpu/setjmp.S 2005-03-22 11:53:10.054702658 -0500
1038@@ -0,0 +1,39 @@
1039+/* setjmp for ARM.
1040+ Copyright (C) 2004 Free Software Foundation, Inc.
1041+ This file is part of the GNU C Library.
1042+
1043+ The GNU C Library is free software; you can redistribute it and/or
1044+ modify it under the terms of the GNU Lesser General Public
1045+ License as published by the Free Software Foundation; either
1046+ version 2.1 of the License, or (at your option) any later version.
1047+
1048+ The GNU C Library is distributed in the hope that it will be useful,
1049+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1050+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1051+ Lesser General Public License for more details.
1052+
1053+ You should have received a copy of the GNU Lesser General Public
1054+ License along with the GNU C Library; if not, write to the Free
1055+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1056+ 02111-1307 USA. */
1057+
1058+#include <sysdep.h>
1059+#define _SETJMP_H
1060+#define _ASM
1061+#include <bits/setjmp.h>
1062+
1063+ENTRY (__sigsetjmp)
1064+ mov ip, r0
1065+
1066+ /* Store the integer registers. */
1067+ stmia ip!, {v1-v6, sl, fp, sp, lr}
1068+
1069+ /* Store the VFP registers. */
1070+ fstmiax ip!, {d8-d15}
1071+ /* Store the floating-point status register. */
1072+ fmrx r2, fpscr
1073+ str r2, [ip], #4
1074+
1075+ /* Make a tail call to __sigjmp_save; it takes the same args. */
1076+ B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
1077+END (__sigsetjmp)
1078Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/configure
1079===================================================================
1080--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1081+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/configure 2005-03-22 11:53:10.054702658 -0500
1082@@ -0,0 +1,5 @@
1083+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
1084+ # Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
1085+
1086+arch_minimum_kernel=2.4.17
1087+libc_cv_gcc_unwind_find_fde=no
1088Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/configure.in
1089===================================================================
1090--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1091+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/configure.in 2005-03-22 11:53:10.054702658 -0500
1092@@ -0,0 +1,5 @@
1093+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
1094+# Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
1095+
1096+arch_minimum_kernel=2.4.17
1097+libc_cv_gcc_unwind_find_fde=no
1098Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c
1099===================================================================
1100--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1101+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c 2005-03-22 11:53:10.054702658 -0500
1102@@ -0,0 +1,37 @@
1103+/* epoll_ctl wrapper for ARM EABI.
1104+ Copyright (C) 2005 Free Software Foundation, Inc.
1105+ This file is part of the GNU C Library.
1106+
1107+ The GNU C Library is free software; you can redistribute it and/or
1108+ modify it under the terms of the GNU Lesser General Public
1109+ License as published by the Free Software Foundation; either
1110+ version 2.1 of the License, or (at your option) any later version.
1111+
1112+ The GNU C Library is distributed in the hope that it will be useful,
1113+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1114+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1115+ Lesser General Public License for more details.
1116+
1117+ You should have received a copy of the GNU Lesser General Public
1118+ License along with the GNU C Library; if not, write to the Free
1119+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1120+ 02111-1307 USA. */
1121+
1122+#include <sysdep.h>
1123+#include <errno.h>
1124+#include <sys/epoll.h>
1125+
1126+#include <kernel_epoll.h>
1127+
1128+int
1129+epoll_ctl (int __epfd, int __op, int __fd, struct epoll_event *__event)
1130+{
1131+ struct kernel_epoll_event k_event;
1132+
1133+ k_event.events = __event->events;
1134+ memcpy (&k_event.data, &__event->data, sizeof (k_event.data));
1135+
1136+ return INLINE_SYSCALL (epoll_ctl, 4, __epfd, __op, __fd, &k_event);
1137+}
1138+
1139+libc_hidden_def (epoll_ctl)
1140Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c
1141===================================================================
1142--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1143+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c 2005-03-22 11:53:10.055702416 -0500
1144@@ -0,0 +1,54 @@
1145+/* epoll_ctl wrapper for ARM EABI.
1146+ Copyright (C) 2005 Free Software Foundation, Inc.
1147+ This file is part of the GNU C Library.
1148+
1149+ The GNU C Library is free software; you can redistribute it and/or
1150+ modify it under the terms of the GNU Lesser General Public
1151+ License as published by the Free Software Foundation; either
1152+ version 2.1 of the License, or (at your option) any later version.
1153+
1154+ The GNU C Library is distributed in the hope that it will be useful,
1155+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1156+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1157+ Lesser General Public License for more details.
1158+
1159+ You should have received a copy of the GNU Lesser General Public
1160+ License along with the GNU C Library; if not, write to the Free
1161+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1162+ 02111-1307 USA. */
1163+
1164+#include <sysdep.h>
1165+#include <errno.h>
1166+#include <sys/epoll.h>
1167+#include <stdlib.h>
1168+
1169+#include <kernel_epoll.h>
1170+
1171+int
1172+epoll_wait (int __epfd, struct epoll_event *__events,
1173+ int __maxevents, int __timeout);
1174+{
1175+ struct kernel_epoll_event *k_events;
1176+ int result;
1177+
1178+ k_events = malloc (sizeof (struct kernel_epoll_event) * __maxevents);
1179+ if (k_events == NULL)
1180+ {
1181+ __set_errno (ENOMEM);
1182+ return -1;
1183+ }
1184+
1185+ result = INLINE_SYSCALL (epoll_wait, 4, __epfd, __events, k_events,
1186+ __timeout);
1187+
1188+ for (i = 0; i < result; i++)
1189+ {
1190+ __events[i].events = k_events[i].events;
1191+ memcpy (&__events[i].data, &k_events[i].data, sizeof (k_events[i].data));
1192+ }
1193+
1194+ free (k_events);
1195+ return result;
1196+}
1197+
1198+libc_hidden_def (epoll_wait)
1199Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c
1200===================================================================
1201--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1202+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c 2005-03-22 11:53:10.055702416 -0500
1203@@ -0,0 +1,76 @@
1204+/* Return information about the filesystem on which FD resides.
1205+ Copyright (C) 1996,1997,1998,1999,2000,2003,2005
1206+ Free Software Foundation, Inc.
1207+ This file is part of the GNU C Library.
1208+
1209+ The GNU C Library is free software; you can redistribute it and/or
1210+ modify it under the terms of the GNU Lesser General Public
1211+ License as published by the Free Software Foundation; either
1212+ version 2.1 of the License, or (at your option) any later version.
1213+
1214+ The GNU C Library is distributed in the hope that it will be useful,
1215+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1216+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1217+ Lesser General Public License for more details.
1218+
1219+ You should have received a copy of the GNU Lesser General Public
1220+ License along with the GNU C Library; if not, write to the Free
1221+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1222+ 02111-1307 USA. */
1223+
1224+#include <errno.h>
1225+#include <string.h>
1226+#include <sys/statfs.h>
1227+#include <stddef.h>
1228+#include <sysdep.h>
1229+
1230+/* Defined in statfs64.c. */
1231+extern int __no_statfs64 attribute_hidden;
1232+
1233+/* Return information about the filesystem on which FD resides. */
1234+int
1235+__fstatfs64 (int fd, struct statfs64 *buf)
1236+{
1237+#ifdef __NR_fstatfs64
1238+# if __ASSUME_STATFS64 == 0
1239+ if (! __no_statfs64)
1240+# endif
1241+ {
1242+ /* The EABI structure is the same as the old ABI structure, except
1243+ that it has four additional bytes of padding - at the end. We can
1244+ ignore them. */
1245+ int result = INLINE_SYSCALL (fstatfs64, 3, fd, sizeof (*buf) - 4, buf);
1246+
1247+# if __ASSUME_STATFS64 == 0
1248+ if (result == 0 || errno != ENOSYS)
1249+# endif
1250+ return result;
1251+
1252+# if __ASSUME_STATFS64 == 0
1253+ __no_statfs64 = 1;
1254+# endif
1255+ }
1256+#endif
1257+
1258+#if __ASSUME_STATFS64 == 0
1259+ struct statfs buf32;
1260+
1261+ if (__fstatfs (fd, &buf32) < 0)
1262+ return -1;
1263+
1264+ buf->f_type = buf32.f_type;
1265+ buf->f_bsize = buf32.f_bsize;
1266+ buf->f_blocks = buf32.f_blocks;
1267+ buf->f_bfree = buf32.f_bfree;
1268+ buf->f_bavail = buf32.f_bavail;
1269+ buf->f_files = buf32.f_files;
1270+ buf->f_ffree = buf32.f_ffree;
1271+ buf->f_fsid = buf32.f_fsid;
1272+ buf->f_namelen = buf32.f_namelen;
1273+ buf->f_frsize = buf32.f_frsize;
1274+ memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare));
1275+
1276+ return 0;
1277+#endif
1278+}
1279+weak_alias (__fstatfs64, fstatfs64)
1280Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c
1281===================================================================
1282--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1283+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c 2005-03-22 11:53:10.055702416 -0500
1284@@ -0,0 +1,100 @@
1285+/* fxstat64 using old-style Unix fstat system call.
1286+ Copyright (C) 1997-2002, 2003, 2005 Free Software Foundation, Inc.
1287+ This file is part of the GNU C Library.
1288+
1289+ The GNU C Library is free software; you can redistribute it and/or
1290+ modify it under the terms of the GNU Lesser General Public
1291+ License as published by the Free Software Foundation; either
1292+ version 2.1 of the License, or (at your option) any later version.
1293+
1294+ The GNU C Library is distributed in the hope that it will be useful,
1295+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1296+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1297+ Lesser General Public License for more details.
1298+
1299+ You should have received a copy of the GNU Lesser General Public
1300+ License along with the GNU C Library; if not, write to the Free
1301+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1302+ 02111-1307 USA. */
1303+
1304+#include <errno.h>
1305+#include <stddef.h>
1306+#include <sys/stat.h>
1307+#include <kernel_stat.h>
1308+
1309+#include <sysdep.h>
1310+#include <sys/syscall.h>
1311+#include <bp-checks.h>
1312+
1313+#include "kernel-features.h"
1314+
1315+#if __ASSUME_STAT64_SYSCALL == 0
1316+# include <xstatconv.h>
1317+#endif
1318+
1319+#ifdef __NR_fstat64
1320+# if __ASSUME_STAT64_SYSCALL == 0
1321+/* The variable is shared between all wrappers around *stat64 calls. */
1322+extern int __have_no_stat64;
1323+# endif
1324+#endif
1325+
1326+/* Get information about the file FD in BUF. */
1327+
1328+int
1329+___fxstat64 (int vers, int fd, struct stat64 *buf)
1330+{
1331+ int result;
1332+ struct kernel_stat64 kbuf64;
1333+
1334+#if __ASSUME_STAT64_SYSCALL > 0
1335+ result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (&kbuf64));
1336+ if (result == 0)
1337+ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
1338+# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
1339+ if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
1340+ buf->st_ino = buf->__st_ino;
1341+# endif
1342+ return result;
1343+#else
1344+ struct kernel_stat kbuf;
1345+# if defined __NR_fstat64
1346+ if (! __have_no_stat64)
1347+ {
1348+ int saved_errno = errno;
1349+ result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (&kbuf64));
1350+
1351+ if (result != -1 || errno != ENOSYS)
1352+ {
1353+ if (result == 0)
1354+ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
1355+# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
1356+ if (!result && buf->__st_ino != (__ino_t)buf->st_ino)
1357+ buf->st_ino = buf->__st_ino;
1358+# endif
1359+ return result;
1360+ }
1361+
1362+ __set_errno (saved_errno);
1363+ __have_no_stat64 = 1;
1364+ }
1365+# endif
1366+ result = INLINE_SYSCALL (fstat, 2, fd, __ptrvalue (&kbuf));
1367+ if (result == 0)
1368+ result = __xstat64_conv (vers, &kbuf, buf);
1369+
1370+ return result;
1371+#endif
1372+}
1373+
1374+#include <shlib-compat.h>
1375+
1376+#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
1377+versioned_symbol (libc, ___fxstat64, __fxstat64, GLIBC_2_2);
1378+strong_alias (___fxstat64, __old__fxstat64)
1379+compat_symbol (libc, __old__fxstat64, __fxstat64, GLIBC_2_1);
1380+hidden_ver (___fxstat64, __fxstat64)
1381+#else
1382+strong_alias (___fxstat64, __fxstat64)
1383+hidden_def (__fxstat64)
1384+#endif
1385Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h
1386===================================================================
1387--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1388+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h 2005-03-22 11:53:10.056702174 -0500
1389@@ -0,0 +1,59 @@
1390+/* Copyright (C) 2005 Free Software Foundation, Inc.
1391+ This file is part of the GNU C Library.
1392+
1393+ The GNU C Library is free software; you can redistribute it and/or
1394+ modify it under the terms of the GNU Lesser General Public
1395+ License as published by the Free Software Foundation; either
1396+ version 2.1 of the License, or (at your option) any later version.
1397+
1398+ The GNU C Library is distributed in the hope that it will be useful,
1399+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1400+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1401+ Lesser General Public License for more details.
1402+
1403+ You should have received a copy of the GNU Lesser General Public
1404+ License along with the GNU C Library; if not, write to the Free
1405+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1406+ 02111-1307 USA. */
1407+
1408+#include <sysdeps/unix/sysv/linux/kernel_stat.h>
1409+
1410+/* kernel_stat64 is just like stat64, except packed. The EABI aligns
1411+ st_size to an eight byte boundary but the old ABI only aligns it to
1412+ four. Similarly st_blocks. */
1413+struct kernel_stat64
1414+ {
1415+ __dev_t st_dev; /* Device. */
1416+ unsigned int __pad1;
1417+
1418+ __ino_t __st_ino; /* 32bit file serial number. */
1419+ __mode_t st_mode; /* File mode. */
1420+ __nlink_t st_nlink; /* Link count. */
1421+ __uid_t st_uid; /* User ID of the file's owner. */
1422+ __gid_t st_gid; /* Group ID of the file's group.*/
1423+ __dev_t st_rdev; /* Device number, if device. */
1424+ unsigned int __pad2;
1425+ __off64_t st_size; /* Size of file, in bytes. */
1426+ __blksize_t st_blksize; /* Optimal block size for I/O. */
1427+
1428+ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
1429+#ifdef __USE_MISC
1430+ /* Nanosecond resolution timestamps are stored in a format
1431+ equivalent to 'struct timespec'. This is the type used
1432+ whenever possible but the Unix namespace rules do not allow the
1433+ identifier 'timespec' to appear in the <sys/stat.h> header.
1434+ Therefore we have to handle the use of this header in strictly
1435+ standard-compliant sources special. */
1436+ struct timespec st_atim; /* Time of last access. */
1437+ struct timespec st_mtim; /* Time of last modification. */
1438+ struct timespec st_ctim; /* Time of last status change. */
1439+#else
1440+ __time_t st_atime; /* Time of last access. */
1441+ unsigned long int st_atimensec; /* Nscecs of last access. */
1442+ __time_t st_mtime; /* Time of last modification. */
1443+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
1444+ __time_t st_ctime; /* Time of last status change. */
1445+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
1446+#endif
1447+ __ino64_t st_ino; /* File serial number. */
1448+ } __attribute__ ((packed,aligned(4)));
1449Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c
1450===================================================================
1451--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1452+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c 2005-03-22 11:53:10.056702174 -0500
1453@@ -0,0 +1,99 @@
1454+/* lxstat64 using old-style Unix lstat system call.
1455+ Copyright (C) 1997-2002, 2003, 2005 Free Software Foundation, Inc.
1456+ This file is part of the GNU C Library.
1457+
1458+ The GNU C Library is free software; you can redistribute it and/or
1459+ modify it under the terms of the GNU Lesser General Public
1460+ License as published by the Free Software Foundation; either
1461+ version 2.1 of the License, or (at your option) any later version.
1462+
1463+ The GNU C Library is distributed in the hope that it will be useful,
1464+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1465+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1466+ Lesser General Public License for more details.
1467+
1468+ You should have received a copy of the GNU Lesser General Public
1469+ License along with the GNU C Library; if not, write to the Free
1470+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1471+ 02111-1307 USA. */
1472+
1473+#include <errno.h>
1474+#include <stddef.h>
1475+#include <sys/stat.h>
1476+#include <kernel_stat.h>
1477+
1478+#include <sysdep.h>
1479+#include <sys/syscall.h>
1480+#include <bp-checks.h>
1481+
1482+#include "kernel-features.h"
1483+
1484+#if __ASSUME_STAT64_SYSCALL == 0
1485+# include <xstatconv.h>
1486+#endif
1487+
1488+#ifdef __NR_lstat64
1489+# if __ASSUME_STAT64_SYSCALL == 0
1490+/* The variable is shared between all wrappers around *stat64 calls. */
1491+extern int __have_no_stat64;
1492+# endif
1493+#endif
1494+
1495+/* Get information about the file NAME in BUF. */
1496+int
1497+___lxstat64 (int vers, const char *name, struct stat64 *buf)
1498+{
1499+ int result;
1500+ struct kernel_stat64 kbuf64;
1501+
1502+#ifdef __ASSUME_STAT64_SYSCALL
1503+ result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
1504+ if (result == 0)
1505+ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
1506+# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
1507+ if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
1508+ buf->st_ino = buf->__st_ino;
1509+# endif
1510+ return result;
1511+#else
1512+ struct kernel_stat kbuf;
1513+# ifdef __NR_lstat64
1514+ if (! __have_no_stat64)
1515+ {
1516+ int saved_errno = errno;
1517+ result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
1518+
1519+ if (result != -1 || errno != ENOSYS)
1520+ {
1521+ if (result == 0)
1522+ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
1523+# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
1524+ if (!result && buf->__st_ino != (__ino_t) buf->st_ino)
1525+ buf->st_ino = buf->__st_ino;
1526+# endif
1527+ return result;
1528+ }
1529+
1530+ __set_errno (saved_errno);
1531+ __have_no_stat64 = 1;
1532+ }
1533+# endif
1534+ result = INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
1535+ if (result == 0)
1536+ result = __xstat64_conv (vers, &kbuf, buf);
1537+
1538+ return result;
1539+#endif
1540+}
1541+
1542+#include <shlib-compat.h>
1543+
1544+#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
1545+versioned_symbol (libc, ___lxstat64, __lxstat64, GLIBC_2_2);
1546+strong_alias (___lxstat64, __old__lxstat64)
1547+compat_symbol (libc, __old__lxstat64, __lxstat64, GLIBC_2_1);
1548+hidden_ver (___lxstat64, __lxstat64)
1549+#else
1550+strong_alias (___lxstat64, __lxstat64);
1551+hidden_def (__lxstat64)
1552+#endif
1553Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c
1554===================================================================
1555--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1556+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c 2005-03-22 11:53:10.056702174 -0500
1557@@ -0,0 +1 @@
1558+/* Empty. */
1559Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c
1560===================================================================
1561--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1562+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c 2005-03-22 11:53:10.056702174 -0500
1563@@ -0,0 +1 @@
1564+/* Empty. */
1565Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/semop.c
1566===================================================================
1567--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1568+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/semop.c 2005-03-22 11:53:10.056702174 -0500
1569@@ -0,0 +1,67 @@
1570+/* Copyright (C) 1995, 1997, 1998, 1999, 2000, 2005
1571+ Free Software Foundation, Inc.
1572+ This file is part of the GNU C Library.
1573+ Contributed by Ulrich Drepper <drepper@cygnus.com>, August 1995.
1574+
1575+ The GNU C Library is free software; you can redistribute it and/or
1576+ modify it under the terms of the GNU Lesser General Public
1577+ License as published by the Free Software Foundation; either
1578+ version 2.1 of the License, or (at your option) any later version.
1579+
1580+ The GNU C Library is distributed in the hope that it will be useful,
1581+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1582+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1583+ Lesser General Public License for more details.
1584+
1585+ You should have received a copy of the GNU Lesser General Public
1586+ License along with the GNU C Library; if not, write to the Free
1587+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1588+ 02111-1307 USA. */
1589+
1590+#include <errno.h>
1591+#include <sys/sem.h>
1592+#include <ipc_priv.h>
1593+#include <alloca.h>
1594+#include <sysdep.h>
1595+#include <sys/syscall.h>
1596+#include <bp-checks.h>
1597+
1598+struct kernel_sembuf
1599+{
1600+ unsigned short int sem_num; /* semaphore number */
1601+ short int sem_op; /* semaphore operation */
1602+ short int sem_flg; /* operation flag */
1603+ short int __pad1;
1604+};
1605+
1606+/* Perform user-defined atomical operation of array of semaphores. */
1607+
1608+int
1609+semop (semid, sops, nsops)
1610+ int semid;
1611+ struct sembuf *sops;
1612+ size_t nsops;
1613+{
1614+ struct kernel_sembuf *ksops = alloca (sizeof (sops[0]) * nsops);
1615+ size_t i;
1616+ int result;
1617+
1618+ for (i = 0; i < nsops; i++)
1619+ {
1620+ ksops[i].sem_num = sops[i].sem_num;
1621+ ksops[i].sem_op = sops[i].sem_op;
1622+ ksops[i].sem_flg = sops[i].sem_flg;
1623+ }
1624+
1625+ result = INLINE_SYSCALL (ipc, 5, IPCOP_semop,
1626+ semid, (int) nsops, 0, CHECK_N (ksops, nsops));
1627+
1628+ for (i = 0; i < nsops; i++)
1629+ {
1630+ sops[i].sem_num = ksops[i].sem_num;
1631+ sops[i].sem_op = ksops[i].sem_op;
1632+ sops[i].sem_flg = ksops[i].sem_flg;
1633+ }
1634+
1635+ return result;
1636+}
1637Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c
1638===================================================================
1639--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1640+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c 2005-03-22 11:53:10.057701931 -0500
1641@@ -0,0 +1,69 @@
1642+/* Copyright (C) 1995, 1997, 1998, 1999, 2000, 2005
1643+ Free Software Foundation, Inc.
1644+ This file is part of the GNU C Library.
1645+ Contributed by Ulrich Drepper <drepper@cygnus.com>, August 1995.
1646+
1647+ The GNU C Library is free software; you can redistribute it and/or
1648+ modify it under the terms of the GNU Lesser General Public
1649+ License as published by the Free Software Foundation; either
1650+ version 2.1 of the License, or (at your option) any later version.
1651+
1652+ The GNU C Library is distributed in the hope that it will be useful,
1653+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1654+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1655+ Lesser General Public License for more details.
1656+
1657+ You should have received a copy of the GNU Lesser General Public
1658+ License along with the GNU C Library; if not, write to the Free
1659+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1660+ 02111-1307 USA. */
1661+
1662+#include <errno.h>
1663+#include <sys/sem.h>
1664+#include <ipc_priv.h>
1665+#include <alloca.h>
1666+#include <sysdep.h>
1667+#include <sys/syscall.h>
1668+#include <bp-checks.h>
1669+
1670+struct kernel_sembuf
1671+{
1672+ unsigned short int sem_num; /* semaphore number */
1673+ short int sem_op; /* semaphore operation */
1674+ short int sem_flg; /* operation flag */
1675+ short int __pad1;
1676+};
1677+
1678+/* Perform user-defined atomical operation of array of semaphores. */
1679+
1680+int
1681+semtimedop (semid, sops, nsops, timeout)
1682+ int semid;
1683+ struct sembuf *sops;
1684+ size_t nsops;
1685+ const struct timespec *timeout;
1686+{
1687+ struct kernel_sembuf *ksops = alloca (sizeof (sops[0]) * nsops);
1688+ size_t i;
1689+ int result;
1690+
1691+ for (i = 0; i < nsops; i++)
1692+ {
1693+ ksops[i].sem_num = sops[i].sem_num;
1694+ ksops[i].sem_op = sops[i].sem_op;
1695+ ksops[i].sem_flg = sops[i].sem_flg;
1696+ }
1697+
1698+ result = INLINE_SYSCALL (ipc, 6, IPCOP_semtimedop,
1699+ semid, (int) nsops, 0, CHECK_N (sops, nsops),
1700+ timeout);
1701+
1702+ for (i = 0; i < nsops; i++)
1703+ {
1704+ sops[i].sem_num = ksops[i].sem_num;
1705+ sops[i].sem_op = ksops[i].sem_op;
1706+ sops[i].sem_flg = ksops[i].sem_flg;
1707+ }
1708+
1709+ return result;
1710+}
1711Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c
1712===================================================================
1713--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1714+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c 2005-03-22 11:53:10.057701931 -0500
1715@@ -0,0 +1,77 @@
1716+/* Return information about the filesystem on which FILE resides.
1717+ Copyright (C) 1996-2000,2003,2004,2005 Free Software Foundation, Inc.
1718+ This file is part of the GNU C Library.
1719+
1720+ The GNU C Library is free software; you can redistribute it and/or
1721+ modify it under the terms of the GNU Lesser General Public
1722+ License as published by the Free Software Foundation; either
1723+ version 2.1 of the License, or (at your option) any later version.
1724+
1725+ The GNU C Library is distributed in the hope that it will be useful,
1726+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1727+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1728+ Lesser General Public License for more details.
1729+
1730+ You should have received a copy of the GNU Lesser General Public
1731+ License along with the GNU C Library; if not, write to the Free
1732+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1733+ 02111-1307 USA. */
1734+
1735+#include <errno.h>
1736+#include <string.h>
1737+#include <sys/statfs.h>
1738+#include <stddef.h>
1739+#include <sysdep.h>
1740+
1741+
1742+# if __ASSUME_STATFS64 == 0
1743+int __no_statfs64 attribute_hidden;
1744+#endif
1745+
1746+/* Return information about the filesystem on which FILE resides. */
1747+int
1748+__statfs64 (const char *file, struct statfs64 *buf)
1749+{
1750+#ifdef __NR_statfs64
1751+# if __ASSUME_STATFS64 == 0
1752+ if (! __no_statfs64)
1753+# endif
1754+ {
1755+ /* The EABI structure is the same as the old ABI structure, except
1756+ that it has four additional bytes of padding - at the end. We can
1757+ ignore them. */
1758+ int result = INLINE_SYSCALL (statfs64, 3, file, sizeof (*buf) - 4, buf);
1759+
1760+# if __ASSUME_STATFS64 == 0
1761+ if (result == 0 || errno != ENOSYS)
1762+# endif
1763+ return result;
1764+
1765+# if __ASSUME_STATFS64 == 0
1766+ __no_statfs64 = 1;
1767+# endif
1768+ }
1769+#endif
1770+
1771+#if __ASSUME_STATFS64 == 0
1772+ struct statfs buf32;
1773+
1774+ if (__statfs (file, &buf32) < 0)
1775+ return -1;
1776+
1777+ buf->f_type = buf32.f_type;
1778+ buf->f_bsize = buf32.f_bsize;
1779+ buf->f_blocks = buf32.f_blocks;
1780+ buf->f_bfree = buf32.f_bfree;
1781+ buf->f_bavail = buf32.f_bavail;
1782+ buf->f_files = buf32.f_files;
1783+ buf->f_ffree = buf32.f_ffree;
1784+ buf->f_fsid = buf32.f_fsid;
1785+ buf->f_namelen = buf32.f_namelen;
1786+ buf->f_frsize = buf32.f_frsize;
1787+ memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare));
1788+
1789+ return 0;
1790+#endif
1791+}
1792+weak_alias (__statfs64, statfs64)
1793Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/uname.c
1794===================================================================
1795--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1796+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/uname.c 2005-03-22 11:53:10.057701931 -0500
1797@@ -0,0 +1,43 @@
1798+/* Copyright (C) 2005
1799+ Free Software Foundation, Inc.
1800+ This file is part of the GNU C Library.
1801+
1802+ The GNU C Library is free software; you can redistribute it and/or
1803+ modify it under the terms of the GNU Lesser General Public
1804+ License as published by the Free Software Foundation; either
1805+ version 2.1 of the License, or (at your option) any later version.
1806+
1807+ The GNU C Library is distributed in the hope that it will be useful,
1808+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1809+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1810+ Lesser General Public License for more details.
1811+
1812+ You should have received a copy of the GNU Lesser General Public
1813+ License along with the GNU C Library; if not, write to the Free
1814+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1815+ 02111-1307 USA. */
1816+
1817+#include <errno.h>
1818+#include <sysdep.h>
1819+#include <sys/syscall.h>
1820+#include <string.h>
1821+#include <sys/utsname.h>
1822+
1823+/* The kernel's struct utsname is two bytes larger than a userland struct
1824+ utsname due to the APCS structure size boundary. */
1825+
1826+int
1827+__uname (struct utsname *__name)
1828+{
1829+ char buf[sizeof (struct utsname) + 2];
1830+ int result = INLINE_SYSCALL (uname, 1, buf);
1831+
1832+ if (result == 0)
1833+ memcpy (__name, buf, sizeof (struct utsname));
1834+
1835+ return result;
1836+}
1837+
1838+libc_hidden_def (__uname)
1839+strong_alias (__uname, uname)
1840+libc_hidden_weak (uname)
1841Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c
1842===================================================================
1843--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1844+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c 2005-03-22 11:53:10.058701689 -0500
1845@@ -0,0 +1,103 @@
1846+/* xstat64 using old-style Unix stat system call.
1847+ Copyright (C) 1991, 1995-2002, 2003, 2005 Free Software Foundation, Inc.
1848+ This file is part of the GNU C Library.
1849+
1850+ The GNU C Library is free software; you can redistribute it and/or
1851+ modify it under the terms of the GNU Lesser General Public
1852+ License as published by the Free Software Foundation; either
1853+ version 2.1 of the License, or (at your option) any later version.
1854+
1855+ The GNU C Library is distributed in the hope that it will be useful,
1856+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1857+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1858+ Lesser General Public License for more details.
1859+
1860+ You should have received a copy of the GNU Lesser General Public
1861+ License along with the GNU C Library; if not, write to the Free
1862+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1863+ 02111-1307 USA. */
1864+
1865+#include <errno.h>
1866+#include <stddef.h>
1867+#include <sys/stat.h>
1868+#include <kernel_stat.h>
1869+
1870+#include <sysdep.h>
1871+#include <sys/syscall.h>
1872+#include <bp-checks.h>
1873+
1874+#include "kernel-features.h"
1875+
1876+#if __ASSUME_STAT64_SYSCALL == 0
1877+# include <xstatconv.h>
1878+#endif
1879+
1880+#ifdef __NR_stat64
1881+# if __ASSUME_STAT64_SYSCALL == 0
1882+/* The variable is shared between all wrappers around *stat64 calls.
1883+ This is the definition. */
1884+int __have_no_stat64;
1885+# endif
1886+#endif
1887+
1888+/* Get information about the file NAME in BUF. */
1889+
1890+int
1891+___xstat64 (int vers, const char *name, struct stat64 *buf)
1892+{
1893+ int result;
1894+ struct kernel_stat64 kbuf64;
1895+
1896+#if __ASSUME_STAT64_SYSCALL > 0
1897+ result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
1898+ if (result == 0)
1899+ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
1900+# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
1901+ if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
1902+ buf->st_ino = buf->__st_ino;
1903+# endif
1904+ return result;
1905+#else
1906+ struct kernel_stat kbuf;
1907+# if defined __NR_stat64
1908+ if (! __have_no_stat64)
1909+ {
1910+ int saved_errno = errno;
1911+ result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
1912+
1913+ if (result != -1 || errno != ENOSYS)
1914+ {
1915+ if (result == 0)
1916+ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
1917+# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
1918+ if (!result && buf->__st_ino != (__ino_t) buf->st_ino)
1919+ buf->st_ino = buf->__st_ino;
1920+# endif
1921+ return result;
1922+ }
1923+
1924+ __set_errno (saved_errno);
1925+ __have_no_stat64 = 1;
1926+ }
1927+# endif
1928+
1929+ result = INLINE_SYSCALL (stat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
1930+ if (result == 0)
1931+ result = __xstat64_conv (vers, &kbuf, buf);
1932+
1933+ return result;
1934+#endif
1935+}
1936+
1937+
1938+#include <shlib-compat.h>
1939+
1940+#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
1941+versioned_symbol (libc, ___xstat64, __xstat64, GLIBC_2_2);
1942+strong_alias (___xstat64, __old__xstat64)
1943+compat_symbol (libc, __old__xstat64, __xstat64, GLIBC_2_1);
1944+hidden_ver (___xstat64, __xstat64)
1945+#else
1946+strong_alias (___xstat64, __xstat64)
1947+hidden_def (__xstat64)
1948+#endif
1949Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c
1950===================================================================
1951--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1952+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c 2005-03-22 11:53:10.058701689 -0500
1953@@ -0,0 +1,341 @@
1954+/* Convert between the kernel's `struct stat' format, and libc's.
1955+ Copyright (C) 1991,1995-1997,2000,2002,2003 Free Software Foundation, Inc.
1956+ This file is part of the GNU C Library.
1957+
1958+ The GNU C Library is free software; you can redistribute it and/or
1959+ modify it under the terms of the GNU Lesser General Public
1960+ License as published by the Free Software Foundation; either
1961+ version 2.1 of the License, or (at your option) any later version.
1962+
1963+ The GNU C Library is distributed in the hope that it will be useful,
1964+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1965+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1966+ Lesser General Public License for more details.
1967+
1968+ You should have received a copy of the GNU Lesser General Public
1969+ License along with the GNU C Library; if not, write to the Free
1970+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1971+ 02111-1307 USA. */
1972+
1973+#include <errno.h>
1974+#include <sys/stat.h>
1975+#include <kernel_stat.h>
1976+
1977+#ifdef STAT_IS_KERNEL_STAT
1978+
1979+/* Dummy. */
1980+struct kernel_stat;
1981+
1982+#else
1983+
1984+#include <string.h>
1985+
1986+
1987+#if !defined __ASSUME_STAT64_SYSCALL || defined XSTAT_IS_XSTAT64
1988+int
1989+__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
1990+{
1991+ switch (vers)
1992+ {
1993+ case _STAT_VER_KERNEL:
1994+ /* Nothing to do. The struct is in the form the kernel expects.
1995+ We should have short-circuted before we got here, but for
1996+ completeness... */
1997+ *(struct kernel_stat *) ubuf = *kbuf;
1998+ break;
1999+
2000+ case _STAT_VER_LINUX:
2001+ {
2002+ struct stat *buf = ubuf;
2003+
2004+ /* Convert to current kernel version of `struct stat'. */
2005+ buf->st_dev = kbuf->st_dev;
2006+#ifdef _HAVE_STAT___PAD1
2007+ buf->__pad1 = 0;
2008+#endif
2009+ buf->st_ino = kbuf->st_ino;
2010+ buf->st_mode = kbuf->st_mode;
2011+ buf->st_nlink = kbuf->st_nlink;
2012+ buf->st_uid = kbuf->st_uid;
2013+ buf->st_gid = kbuf->st_gid;
2014+ buf->st_rdev = kbuf->st_rdev;
2015+#ifdef _HAVE_STAT___PAD2
2016+ buf->__pad2 = 0;
2017+#endif
2018+ buf->st_size = kbuf->st_size;
2019+ buf->st_blksize = kbuf->st_blksize;
2020+ buf->st_blocks = kbuf->st_blocks;
2021+#ifdef _HAVE_STAT_NSEC
2022+ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
2023+ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
2024+ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
2025+ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
2026+ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
2027+ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
2028+#else
2029+ buf->st_atime = kbuf->st_atime;
2030+ buf->st_mtime = kbuf->st_mtime;
2031+ buf->st_ctime = kbuf->st_ctime;
2032+#endif
2033+#ifdef _HAVE_STAT___UNUSED1
2034+ buf->__unused1 = 0;
2035+#endif
2036+#ifdef _HAVE_STAT___UNUSED2
2037+ buf->__unused2 = 0;
2038+#endif
2039+#ifdef _HAVE_STAT___UNUSED3
2040+ buf->__unused3 = 0;
2041+#endif
2042+#ifdef _HAVE_STAT___UNUSED4
2043+ buf->__unused4 = 0;
2044+#endif
2045+#ifdef _HAVE_STAT___UNUSED5
2046+ buf->__unused5 = 0;
2047+#endif
2048+ }
2049+ break;
2050+
2051+ default:
2052+ __set_errno (EINVAL);
2053+ return -1;
2054+ }
2055+
2056+ return 0;
2057+}
2058+#endif
2059+
2060+int
2061+__xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
2062+{
2063+#ifdef XSTAT_IS_XSTAT64
2064+ return __xstat_conv (vers, kbuf, ubuf);
2065+#else
2066+ switch (vers)
2067+ {
2068+ case _STAT_VER_LINUX:
2069+ {
2070+ struct stat64 *buf = ubuf;
2071+
2072+ /* Convert to current kernel version of `struct stat64'. */
2073+ buf->st_dev = kbuf->st_dev;
2074+#ifdef _HAVE_STAT64___PAD1
2075+ buf->__pad1 = 0;
2076+#endif
2077+ buf->st_ino = kbuf->st_ino;
2078+#ifdef _HAVE_STAT64___ST_INO
2079+ buf->__st_ino = kbuf->st_ino;
2080+#endif
2081+ buf->st_mode = kbuf->st_mode;
2082+ buf->st_nlink = kbuf->st_nlink;
2083+ buf->st_uid = kbuf->st_uid;
2084+ buf->st_gid = kbuf->st_gid;
2085+ buf->st_rdev = kbuf->st_rdev;
2086+#ifdef _HAVE_STAT64___PAD2
2087+ buf->__pad2 = 0;
2088+#endif
2089+ buf->st_size = kbuf->st_size;
2090+ buf->st_blksize = kbuf->st_blksize;
2091+ buf->st_blocks = kbuf->st_blocks;
2092+#ifdef _HAVE_STAT64_NSEC
2093+ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
2094+ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
2095+ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
2096+ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
2097+ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
2098+ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
2099+#else
2100+ buf->st_atime = kbuf->st_atime;
2101+ buf->st_mtime = kbuf->st_mtime;
2102+ buf->st_ctime = kbuf->st_ctime;
2103+#endif
2104+#ifdef _HAVE_STAT64___UNUSED1
2105+ buf->__unused1 = 0;
2106+#endif
2107+#ifdef _HAVE_STAT64___UNUSED2
2108+ buf->__unused2 = 0;
2109+#endif
2110+#ifdef _HAVE_STAT64___UNUSED3
2111+ buf->__unused3 = 0;
2112+#endif
2113+#ifdef _HAVE_STAT64___UNUSED4
2114+ buf->__unused4 = 0;
2115+#endif
2116+#ifdef _HAVE_STAT64___UNUSED5
2117+ buf->__unused5 = 0;
2118+#endif
2119+ }
2120+ break;
2121+
2122+ /* If struct stat64 is different from struct stat then
2123+ _STAT_VER_KERNEL does not make sense. */
2124+ case _STAT_VER_KERNEL:
2125+ default:
2126+ __set_errno (EINVAL);
2127+ return -1;
2128+ }
2129+
2130+ return 0;
2131+#endif
2132+}
2133+
2134+int
2135+__xstat32_conv (int vers, void *kbuf_, struct stat *buf)
2136+{
2137+ struct kernel_stat64 *kbuf = kbuf_;
2138+
2139+ switch (vers)
2140+ {
2141+ case _STAT_VER_LINUX:
2142+ {
2143+ /* Convert current kernel version of `struct stat64' to
2144+ `struct stat'. */
2145+ buf->st_dev = kbuf->st_dev;
2146+#ifdef _HAVE_STAT___PAD1
2147+ buf->__pad1 = 0;
2148+#endif
2149+#ifdef _HAVE_STAT64___ST_INO
2150+# if __ASSUME_ST_INO_64_BIT == 0
2151+ if (kbuf->st_ino == 0)
2152+ buf->st_ino = kbuf->__st_ino;
2153+ else
2154+# endif
2155+ {
2156+ buf->st_ino = kbuf->st_ino;
2157+ if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino)
2158+ && buf->st_ino != kbuf->st_ino)
2159+ {
2160+ __set_errno (EOVERFLOW);
2161+ return -1;
2162+ }
2163+ }
2164+#else
2165+ buf->st_ino = kbuf->st_ino;
2166+ if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino)
2167+ && buf->st_ino != kbuf->st_ino)
2168+ {
2169+ __set_errno (EOVERFLOW);
2170+ return -1;
2171+ }
2172+#endif
2173+ buf->st_mode = kbuf->st_mode;
2174+ buf->st_nlink = kbuf->st_nlink;
2175+ buf->st_uid = kbuf->st_uid;
2176+ buf->st_gid = kbuf->st_gid;
2177+ buf->st_rdev = kbuf->st_rdev;
2178+#ifdef _HAVE_STAT___PAD2
2179+ buf->__pad2 = 0;
2180+#endif
2181+ buf->st_size = kbuf->st_size;
2182+ /* Check for overflow. */
2183+ if (sizeof (buf->st_size) != sizeof (kbuf->st_size)
2184+ && buf->st_size != kbuf->st_size)
2185+ {
2186+ __set_errno (EOVERFLOW);
2187+ return -1;
2188+ }
2189+ buf->st_blksize = kbuf->st_blksize;
2190+ buf->st_blocks = kbuf->st_blocks;
2191+ /* Check for overflow. */
2192+ if (sizeof (buf->st_blocks) != sizeof (kbuf->st_blocks)
2193+ && buf->st_blocks != kbuf->st_blocks)
2194+ {
2195+ __set_errno (EOVERFLOW);
2196+ return -1;
2197+ }
2198+#ifdef _HAVE_STAT_NSEC
2199+ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
2200+ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
2201+ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
2202+ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
2203+ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
2204+ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
2205+#else
2206+ buf->st_atime = kbuf->st_atime;
2207+ buf->st_mtime = kbuf->st_mtime;
2208+ buf->st_ctime = kbuf->st_ctime;
2209+#endif
2210+
2211+#ifdef _HAVE_STAT___UNUSED1
2212+ buf->__unused1 = 0;
2213+#endif
2214+#ifdef _HAVE_STAT___UNUSED2
2215+ buf->__unused2 = 0;
2216+#endif
2217+#ifdef _HAVE_STAT___UNUSED3
2218+ buf->__unused3 = 0;
2219+#endif
2220+#ifdef _HAVE_STAT___UNUSED4
2221+ buf->__unused4 = 0;
2222+#endif
2223+#ifdef _HAVE_STAT___UNUSED5
2224+ buf->__unused5 = 0;
2225+#endif
2226+ }
2227+ break;
2228+
2229+ /* If struct stat64 is different from struct stat then
2230+ _STAT_VER_KERNEL does not make sense. */
2231+ case _STAT_VER_KERNEL:
2232+ default:
2233+ __set_errno (EINVAL);
2234+ return -1;
2235+ }
2236+
2237+ return 0;
2238+}
2239+
2240+int
2241+__xstat64_kernel64_conv (int vers, void *kbuf_, struct stat64 *buf)
2242+{
2243+ struct kernel_stat64 *kbuf = kbuf_;
2244+
2245+ switch (vers)
2246+ {
2247+ case _STAT_VER_LINUX:
2248+ {
2249+ /* Convert current kernel version of `struct stat64' to
2250+ user version of `struct stat64'. */
2251+ buf->st_dev = kbuf->st_dev;
2252+#ifdef _HAVE_STAT64___PAD1
2253+ buf->__pad1 = kbuf->__pad1;
2254+#endif
2255+#ifdef _HAVE_STAT64___ST_INO
2256+ buf->__st_ino = kbuf->__st_ino;
2257+#endif
2258+ buf->st_mode = kbuf->st_mode;
2259+ buf->st_nlink = kbuf->st_nlink;
2260+ buf->st_uid = kbuf->st_uid;
2261+ buf->st_gid = kbuf->st_gid;
2262+ buf->st_rdev = kbuf->st_rdev;
2263+#ifdef _HAVE_STAT64___PAD2
2264+ buf->__pad2 = kbuf->__pad2;
2265+#endif
2266+ buf->st_size = kbuf->st_size;
2267+ buf->st_blksize = kbuf->st_blksize;
2268+ buf->st_blocks = kbuf->st_blocks;
2269+#ifdef _HAVE_STAT64_NSEC
2270+ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
2271+ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
2272+ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
2273+ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
2274+ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
2275+ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
2276+#else
2277+ buf->st_atime = kbuf->st_atime;
2278+ buf->st_mtime = kbuf->st_mtime;
2279+ buf->st_ctime = kbuf->st_ctime;
2280+#endif
2281+ buf->st_ino = kbuf->st_ino;
2282+ }
2283+ break;
2284+
2285+ case _STAT_VER_KERNEL:
2286+ default:
2287+ __set_errno (EINVAL);
2288+ return -1;
2289+ }
2290+
2291+ return 0;
2292+}
2293+
2294+#endif
2295Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h
2296===================================================================
2297--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2298+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h 2005-03-22 11:53:10.058701689 -0500
2299@@ -0,0 +1,28 @@
2300+/* Convert between the kernel's `struct stat' format, and libc's.
2301+ Copyright (C) 1991,1995-1997,2000,2002,2003 Free Software Foundation, Inc.
2302+ This file is part of the GNU C Library.
2303+
2304+ The GNU C Library is free software; you can redistribute it and/or
2305+ modify it under the terms of the GNU Lesser General Public
2306+ License as published by the Free Software Foundation; either
2307+ version 2.1 of the License, or (at your option) any later version.
2308+
2309+ The GNU C Library is distributed in the hope that it will be useful,
2310+ but WITHOUT ANY WARRANTY; without even the implied warranty of
2311+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2312+ Lesser General Public License for more details.
2313+
2314+ You should have received a copy of the GNU Lesser General Public
2315+ License along with the GNU C Library; if not, write to the Free
2316+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2317+ 02111-1307 USA. */
2318+
2319+#include "kernel-features.h"
2320+
2321+#ifndef STAT_IS_KERNEL_STAT
2322+extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf);
2323+extern int __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf);
2324+#endif
2325+extern int __xstat32_conv (int vers, void *kbuf, struct stat *buf);
2326+extern int __xstat64_kernel64_conv (int vers, struct kernel_stat64 *kbuf,
2327+ struct stat64 *buf);
2328Index: glibc/sysdeps/arm/eabi/fpu/fraiseexcpt.c
2329===================================================================
2330--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2331+++ glibc/sysdeps/arm/eabi/fpu/fraiseexcpt.c 2005-03-22 12:34:55.522464918 -0500
2332@@ -0,0 +1,67 @@
2333+/* Raise given exceptions.
2334+ Copyright (C) 2004 Free Software Foundation, Inc.
2335+ This file is part of the GNU C Library.
2336+
2337+ The GNU C Library is free software; you can redistribute it and/or
2338+ modify it under the terms of the GNU Lesser General Public
2339+ License as published by the Free Software Foundation; either
2340+ version 2.1 of the License, or (at your option) any later version.
2341+
2342+ The GNU C Library is distributed in the hope that it will be useful,
2343+ but WITHOUT ANY WARRANTY; without even the implied warranty of
2344+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2345+ Lesser General Public License for more details.
2346+
2347+ You should have received a copy of the GNU Lesser General Public
2348+ License along with the GNU C Library; if not, write to the Free
2349+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2350+ 02111-1307 USA. */
2351+
2352+#include <fpu_control.h>
2353+#include <fenv.h>
2354+#include <float.h>
2355+
2356+int
2357+feraiseexcept (int excepts)
2358+{
2359+ float dummy;
2360+ int fpscr;
2361+
2362+ /* Raise exceptions represented by EXPECTS. But we must raise only
2363+ one signal at a time. It is important that if the overflow/underflow
2364+ exception and the inexact exception are given at the same time,
2365+ the overflow/underflow exception follows the inexact exception. After
2366+ each exception we read from the fpscr, to force the exception to be
2367+ raised immediately. */
2368+
2369+ /* First: invalid exception. */
2370+ if (FE_INVALID & excepts)
2371+ __asm__ __volatile__ ("fdivs %0,%2,%3\n\tfmrx %1, fpscr"
2372+ : "=w" (dummy), "=r" (fpscr) : "w" (0.0f), "w" (0.0f) );
2373+
2374+ /* Next: division by zero. */
2375+ if (FE_DIVBYZERO & excepts)
2376+ __asm__ __volatile__ ("fdivs %0,%2,%3\n\tfmrx %1, fpscr"
2377+ : "=w" (dummy), "=r" (fpscr) : "w" (1.0f), "w" (0.0f) );
2378+
2379+ /* Next: overflow. */
2380+ if (FE_OVERFLOW & excepts)
2381+ /* There's no way to raise overflow without also raising inexact. */
2382+ __asm__ __volatile__ ("fadds %0,%2,%3\n\tfmrx %1, fpscr"
2383+ : "=w" (dummy), "=r" (fpscr) : "w" (FLT_MAX), "w" (1.0e32f) );
2384+
2385+ /* Next: underflow. */
2386+ if (FE_UNDERFLOW & excepts)
2387+ __asm__ __volatile__ ("fdivs %0,%2,%3\n\tfmrx %1, fpscr"
2388+ : "=w" (dummy), "=r" (fpscr) : "w" (FLT_MIN), "w" (3.0f) );
2389+
2390+ /* Last: inexact. */
2391+ if (FE_INEXACT & excepts)
2392+ __asm__ __volatile__ ("fdivs %0,%2,%3\n\tfmrx %1, fpscr"
2393+ : "=w" (dummy), "=r" (fpscr) : "w" (2.0f), "w" (3.0f) );
2394+
2395+ /* Success. */
2396+ return 0;
2397+}
2398+
2399+libm_hidden_def (feraiseexcept)
2400Index: glibc/sysdeps/arm/eabi/fpu/feholdexcpt.c
2401===================================================================
2402--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2403+++ glibc/sysdeps/arm/eabi/fpu/feholdexcpt.c 2005-03-22 12:34:55.521465156 -0500
2404@@ -0,0 +1,41 @@
2405+/* Store current floating-point environment and clear exceptions.
2406+ Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
2407+ This file is part of the GNU C Library.
2408+
2409+ The GNU C Library is free software; you can redistribute it and/or
2410+ modify it under the terms of the GNU Lesser General Public
2411+ License as published by the Free Software Foundation; either
2412+ version 2.1 of the License, or (at your option) any later version.
2413+
2414+ The GNU C Library is distributed in the hope that it will be useful,
2415+ but WITHOUT ANY WARRANTY; without even the implied warranty of
2416+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2417+ Lesser General Public License for more details.
2418+
2419+ You should have received a copy of the GNU Lesser General Public
2420+ License along with the GNU C Library; if not, write to the Free
2421+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2422+ 02111-1307 USA. */
2423+
2424+#include <fenv.h>
2425+#include <fpu_control.h>
2426+
2427+int
2428+feholdexcept (fenv_t *envp)
2429+{
2430+ unsigned long int temp;
2431+
2432+ /* Store the environment. */
2433+ _FPU_GETCW(temp);
2434+ envp->__cw = temp;
2435+
2436+ /* Now set all exceptions to non-stop. */
2437+ temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
2438+
2439+ /* And clear all exception flags. */
2440+ temp &= ~FE_ALL_EXCEPT;
2441+
2442+ _FPU_SETCW(temp);
2443+
2444+ return 0;
2445+}
2446
diff --git a/meta/packages/glibc/glibc-cvs/eabi-patch-3 b/meta/packages/glibc/glibc-cvs/eabi-patch-3
deleted file mode 100644
index 9bd549ec2b..0000000000
--- a/meta/packages/glibc/glibc-cvs/eabi-patch-3
+++ /dev/null
@@ -1,430 +0,0 @@
1From libc-alpha-return-17228-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Tue Mar 22 16:08:31 2005
2Return-Path: <libc-alpha-return-17228-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
3Delivered-To: listarch-libc-alpha at sources dot redhat dot com
4Received: (qmail 20972 invoked by alias); 22 Mar 2005 16:08:29 -0000
5Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
6Precedence: bulk
7List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
8List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
9List-Post: <mailto:libc-alpha at sources dot redhat dot com>
10List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
11Sender: libc-alpha-owner at sources dot redhat dot com
12Delivered-To: mailing list libc-alpha at sources dot redhat dot com
13Received: (qmail 20165 invoked from network); 22 Mar 2005 16:08:06 -0000
14Received: from unknown (HELO nevyn.them.org) (66.93.172.17)
15 by sourceware dot org with SMTP; 22 Mar 2005 16:08:06 -0000
16Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
17 id 1DDlvX-0006tE-Bh; Tue, 22 Mar 2005 11:08:19 -0500
18Date: Tue, 22 Mar 2005 11:08:19 -0500
19From: Daniel Jacobowitz <drow at false dot org>
20To: libc-alpha at sources dot redhat dot com
21Cc: Phil Blundell <pb at reciva dot com>
22Subject: ARM EABI support - changes to existing ARM code
23Message-ID: <20050322160819.GA26216@nevyn.them.org>
24Mail-Followup-To: libc-alpha at sources dot redhat dot com,
25 Phil Blundell <pb at reciva dot com>
26Mime-Version: 1.0
27Content-Type: text/plain; charset=us-ascii
28Content-Disposition: inline
29User-Agent: Mutt/1.5.6+20040907i
30
31This patch updates the common ARM files for EABI support. The changes are:
32 - Old ARM ABI targets always use FPA (mixed-endian) byte ordering. EABI
33 targets always use VFP byte ordering for doubles, which is standard
34 ieee754 layout. Removing the arm-specific ieee754.h doesn't break FPA;
35 it was a specialized version of the common header, which handles FPA
36 but also handles VFP.
37 - The stack needs to be aligned to eight bytes instead of just four,
38 including in mmap2 and when shifting _dl_argv.
39 - We need some markers around _start to indicate end-of-stack for the
40 unwinder - ARM EABI does not use either SJLJ exceptions or DWARF-2
41 exceptions. It uses a table based format which seems to be not
42 quite completely unlike DWARF-2.
43
44Do these changes look OK?
45
46--
47Daniel Jacobowitz
48CodeSourcery, LLC
49
502005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
51
52 * sysdeps/arm/bits/endian.h (__FLOAT_WORD_ORDER): Handle VFP.
53 * sysdeps/arm/gmp-mparam.h (IEEE_DOUBLE_BIG_ENDIAN,
54 IEEE_DOUBLE_MIXED_ENDIAN): Handle big-endian and VFP.
55 * sysdeps/arm/ieee754.h: Remove.
56
57 * sysdeps/arm/dl-machine.h (_dl_start_user): Align the stack to eight
58 bytes even when shifting arguments.
59 * sysdeps/arm/dl-sysdep.h: New file.
60
61 * sysdeps/arm/elf/start.S (_start): If not using SJLJ exceptions, include
62 EABI unwind markers to terminate unwinding.
63
64 * sysdeps/unix/sysv/linux/arm/mmap64.S: Handle big-endian byte ordering
65 and EABI stack layout.
66
67Index: glibc/sysdeps/arm/bits/endian.h
68===================================================================
69--- glibc.orig/sysdeps/arm/bits/endian.h 2005-03-22 10:26:27.092978200 -0500
70+++ glibc/sysdeps/arm/bits/endian.h 2005-03-22 10:27:39.457490903 -0500
71@@ -9,4 +9,9 @@
72 #else
73 #define __BYTE_ORDER __LITTLE_ENDIAN
74 #endif
75+
76+#ifdef __VFP_FP__
77+#define __FLOAT_WORD_ORDER __BYTE_ORDER
78+#else
79 #define __FLOAT_WORD_ORDER __BIG_ENDIAN
80+#endif
81Index: glibc/sysdeps/arm/dl-machine.h
82===================================================================
83--- glibc.orig/sysdeps/arm/dl-machine.h 2005-03-22 10:26:27.092978200 -0500
84+++ glibc/sysdeps/arm/dl-machine.h 2005-03-22 10:27:39.457490903 -0500
85@@ -156,22 +156,19 @@ _dl_start_user:\n\
86 add sl, pc, sl\n\
87 .L_GOT_GOT:\n\
88 ldr r4, [sl, r4]\n\
89- @ get the original arg count\n\
90- ldr r1, [sp]\n\
91 @ save the entry point in another register\n\
92 mov r6, r0\n\
93- @ adjust the stack pointer to skip the extra args\n\
94- add sp, sp, r4, lsl #2\n\
95- @ subtract _dl_skip_args from original arg count\n\
96- sub r1, r1, r4\n\
97+ @ get the original arg count\n\
98+ ldr r1, [sp]\n\
99 @ get the argv address\n\
100 add r2, sp, #4\n\
101- @ store the new argc in the new stack location\n\
102- str r1, [sp]\n\
103+ @ Fix up the stack if necessary.\n\
104+ cmp r4, #0\n\
105+ bne .L_fixup_stack\n\
106+.L_done_fixup:\n\
107 @ compute envp\n\
108 add r3, r2, r1, lsl #2\n\
109 add r3, r3, #4\n\
110-\n\
111 @ now we call _dl_init\n\
112 ldr r0, .L_LOADED\n\
113 ldr r0, [sl, r0]\n\
114@@ -182,12 +179,45 @@ _dl_start_user:\n\
115 add r0, sl, r0\n\
116 @ jump to the user_s entry point\n\
117 " BX(r6) "\n\
118+\n\
119+ @ iWMMXt and EABI targets require the stack to be eight byte\n\
120+ @ aligned - shuffle arguments etc.\n\
121+.L_fixup_stack:\n\
122+ @ subtract _dl_skip_args from original arg count\n\
123+ sub r1, r1, r4\n\
124+ @ store the new argc in the new stack location\n\
125+ str r1, [sp]\n\
126+ @ find the first unskipped argument\n\
127+ mov r3, r2\n\
128+ add r4, r2, r4, lsl #2\n\
129+ @ shuffle argv down\n\
130+1: ldr r5, [r4], #4\n\
131+ str r5, [r3], #4\n\
132+ cmp r5, #0\n\
133+ bne 1b\n\
134+ @ shuffle envp down\n\
135+1: ldr r5, [r4], #4\n\
136+ str r5, [r3], #4\n\
137+ cmp r5, #0\n\
138+ bne 1b\n\
139+ @ shuffle auxv down\n\
140+1: ldmia r4!, {r0, r5}\n\
141+ stmia r3!, {r0, r5}\n\
142+ cmp r0, #0\n\
143+ bne 1b\n\
144+ @ Update _dl_argv\n\
145+ ldr r3, .L_ARGV\n\
146+ str r2, [sl, r3]\n\
147+ b .L_done_fixup\n\
148+\n\
149 .L_GET_GOT:\n\
150 .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4\n\
151 .L_SKIP_ARGS:\n\
152 .word _dl_skip_args(GOTOFF)\n\
153 .L_FINI_PROC:\n\
154 .word _dl_fini(GOTOFF)\n\
155+.L_ARGV:\n\
156+ .word _dl_argv(GOTOFF)\n\
157 .L_LOADED:\n\
158 .word _rtld_local(GOTOFF)\n\
159 .previous\n\
160Index: glibc/sysdeps/arm/dl-sysdep.h
161===================================================================
162--- /dev/null 1970-01-01 00:00:00.000000000 +0000
163+++ glibc/sysdeps/arm/dl-sysdep.h 2005-03-22 10:27:39.458490675 -0500
164@@ -0,0 +1,41 @@
165+/* System-specific settings for dynamic linker code. ARM version.
166+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
167+ This file is part of the GNU C Library.
168+
169+ The GNU C Library is free software; you can redistribute it and/or
170+ modify it under the terms of the GNU Lesser General Public
171+ License as published by the Free Software Foundation; either
172+ version 2.1 of the License, or (at your option) any later version.
173+
174+ The GNU C Library is distributed in the hope that it will be useful,
175+ but WITHOUT ANY WARRANTY; without even the implied warranty of
176+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
177+ Lesser General Public License for more details.
178+
179+ You should have received a copy of the GNU Lesser General Public
180+ License along with the GNU C Library; if not, write to the Free
181+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
182+ 02111-1307 USA. */
183+
184+#ifndef _DL_SYSDEP_H
185+#define _DL_SYSDEP_H 1
186+
187+/* This macro must be defined to either 0 or 1.
188+
189+ If 1, then an errno global variable hidden in ld.so will work right with
190+ all the errno-using libc code compiled for ld.so, and there is never a
191+ need to share the errno location with libc. This is appropriate only if
192+ all the libc functions that ld.so uses are called without PLT and always
193+ get the versions linked into ld.so rather than the libc ones. */
194+
195+#ifdef IS_IN_rtld
196+# define RTLD_PRIVATE_ERRNO 1
197+#else
198+# define RTLD_PRIVATE_ERRNO 0
199+#endif
200+
201+/* _dl_argv cannot be attribute_relro, because _dl_start_user
202+ might write into it after _dl_start returns. */
203+#define DL_ARGV_NOT_RELRO 1
204+
205+#endif /* dl-sysdep.h */
206Index: glibc/sysdeps/arm/elf/start.S
207===================================================================
208--- glibc.orig/sysdeps/arm/elf/start.S 2005-03-22 10:26:27.096977288 -0500
209+++ glibc/sysdeps/arm/elf/start.S 2005-03-22 11:00:35.178522707 -0500
210@@ -1,5 +1,6 @@
211 /* Startup code for ARM & ELF
212- Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
213+ Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2005
214+ Free Software Foundation, Inc.
215 This file is part of the GNU C Library.
216
217 The GNU C Library is free software; you can redistribute it and/or
218@@ -62,6 +63,10 @@
219 .globl _start
220 .type _start,#function
221 _start:
222+#if !defined(__USING_SJLJ_EXCEPTIONS__)
223+ /* Protect against unhandled exceptions. */
224+ .fnstart
225+#endif
226 /* Fetch address of fini */
227 ldr ip, =__libc_csu_fini
228
229@@ -93,6 +98,11 @@ _start:
230 /* should never get here....*/
231 bl abort
232
233+#if !defined(__USING_SJLJ_EXCEPTIONS__)
234+ .cantunwind
235+ .fnend
236+#endif
237+
238 /* Define a symbol for the first piece of initialized data. */
239 .data
240 .globl __data_start
241Index: glibc/sysdeps/arm/gmp-mparam.h
242===================================================================
243--- glibc.orig/sysdeps/arm/gmp-mparam.h 2005-03-22 10:26:27.092978200 -0500
244+++ glibc/sysdeps/arm/gmp-mparam.h 2005-03-22 11:00:42.795683773 -0500
245@@ -1,6 +1,6 @@
246 /* gmp-mparam.h -- Compiler/machine parameter header file.
247
248-Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
249+Copyright (C) 1991, 1993, 1994, 1995, 2005 Free Software Foundation, Inc.
250
251 This file is part of the GNU MP Library.
252
253@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
254 #define BITS_PER_SHORTINT 16
255 #define BITS_PER_CHAR 8
256
257-#define IEEE_DOUBLE_BIG_ENDIAN 0
258-#define IEEE_DOUBLE_MIXED_ENDIAN 1
259+#if defined(__ARMEB__)
260+# define IEEE_DOUBLE_MIXED_ENDIAN 0
261+# define IEEE_DOUBLE_BIG_ENDIAN 1
262+#elif defined(__VFP_FP__)
263+# define IEEE_DOUBLE_MIXED_ENDIAN 0
264+# define IEEE_DOUBLE_BIG_ENDIAN 0
265+#else
266+# define IEEE_DOUBLE_BIG_ENDIAN 0
267+# define IEEE_DOUBLE_MIXED_ENDIAN 1
268+#endif
269Index: glibc/sysdeps/arm/ieee754.h
270===================================================================
271--- glibc.orig/sysdeps/arm/ieee754.h 2005-03-22 10:26:27.092978200 -0500
272+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
273@@ -1,115 +0,0 @@
274-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
275- This file is part of the GNU C Library.
276-
277- The GNU C Library is free software; you can redistribute it and/or
278- modify it under the terms of the GNU Lesser General Public
279- License as published by the Free Software Foundation; either
280- version 2.1 of the License, or (at your option) any later version.
281-
282- The GNU C Library is distributed in the hope that it will be useful,
283- but WITHOUT ANY WARRANTY; without even the implied warranty of
284- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
285- Lesser General Public License for more details.
286-
287- You should have received a copy of the GNU Lesser General Public
288- License along with the GNU C Library; if not, write to the Free
289- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
290- 02111-1307 USA. */
291-
292-#ifndef _IEEE754_H
293-
294-#define _IEEE754_H 1
295-#include <features.h>
296-
297-#include <endian.h>
298-
299-__BEGIN_DECLS
300-
301-union ieee754_float
302- {
303- float f;
304-
305- /* This is the IEEE 754 single-precision format. */
306- struct
307- {
308- unsigned int mantissa:23;
309- unsigned int exponent:8;
310- unsigned int negative:1;
311- } ieee;
312-
313- /* This format makes it easier to see if a NaN is a signalling NaN. */
314- struct
315- {
316- unsigned int mantissa:22;
317- unsigned int quiet_nan:1;
318- unsigned int exponent:8;
319- unsigned int negative:1;
320- } ieee_nan;
321- };
322-
323-#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
324-
325-
326-union ieee754_double
327- {
328- double d;
329-
330- /* This is the IEEE 754 double-precision format. */
331- struct
332- {
333- unsigned int mantissa0:20;
334- unsigned int exponent:11;
335- unsigned int negative:1;
336- unsigned int mantissa1:32;
337- } ieee;
338-
339- /* This format makes it easier to see if a NaN is a signalling NaN. */
340- struct
341- {
342- unsigned int mantissa0:19;
343- unsigned int quiet_nan:1;
344- unsigned int exponent:11;
345- unsigned int negative:1;
346- unsigned int mantissa1:32;
347- } ieee_nan;
348- };
349-
350-#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
351-
352-
353-/* The following two structures are correct for `new' floating point systems but
354- wrong for the old FPPC. The only solution seems to be to avoid their use on
355- old hardware. */
356-
357-union ieee854_long_double
358- {
359- long double d;
360-
361- /* This is the IEEE 854 double-extended-precision format. */
362- struct
363- {
364- unsigned int exponent:15;
365- unsigned int empty:16;
366- unsigned int negative:1;
367- unsigned int mantissa1:32;
368- unsigned int mantissa0:32;
369- } ieee;
370-
371- /* This is for NaNs in the IEEE 854 double-extended-precision format. */
372- struct
373- {
374- unsigned int exponent:15;
375- unsigned int empty:16;
376- unsigned int negative:1;
377- unsigned int mantissa1:32;
378- unsigned int mantissa0:30;
379- unsigned int quiet_nan:1;
380- unsigned int one:1;
381- } ieee_nan;
382- };
383-
384-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
385-
386-__END_DECLS
387-
388-#endif /* ieee754.h */
389Index: glibc/sysdeps/unix/sysv/linux/arm/mmap64.S
390===================================================================
391--- glibc.orig/sysdeps/unix/sysv/linux/arm/mmap64.S 2005-03-22 10:26:27.097977060 -0500
392+++ glibc/sysdeps/unix/sysv/linux/arm/mmap64.S 2005-03-22 11:00:53.051209928 -0500
393@@ -1,4 +1,4 @@
394-/* Copyright (C) 2000, 2003 Free Software Foundation, Inc.
395+/* Copyright (C) 2000, 2003, 2005 Free Software Foundation, Inc.
396 This file is part of the GNU C Library.
397
398 The GNU C Library is free software; you can redistribute it and/or
399@@ -23,13 +23,28 @@
400
401 #include "kernel-features.h"
402
403+#ifdef __ARM_EABI__
404+# define INITIAL_OFFSET 8
405+#else
406+# define INITIAL_OFFSET 4
407+#endif
408+
409+#ifdef __ARMEB__
410+# define LOW_OFFSET INITIAL_OFFSET + 4
411+/* The initial + 4 is for the stack postdecrement. */
412+# define HIGH_OFFSET 4 + INITIAL_OFFSET + 0
413+#else
414+# define LOW_OFFSET INITIAL_OFFSET + 0
415+# define HIGH_OFFSET 4 + INITIAL_OFFSET + 4
416+#endif
417+
418 /* The mmap2 system call takes six arguments, all in registers. */
419 .text
420 ENTRY (__mmap64)
421 #ifdef __NR_mmap2
422- ldr ip, [sp, $4] @ offset low part
423+ ldr ip, [sp, $LOW_OFFSET] @ offset low part
424 str r5, [sp, #-4]!
425- ldr r5, [sp, $12] @ offset high part
426+ ldr r5, [sp, $HIGH_OFFSET] @ offset high part
427 str r4, [sp, #-4]!
428 movs r4, ip, lsl $20 @ check that offset is page-aligned
429 mov ip, ip, lsr $12
430
diff --git a/meta/packages/glibc/glibc-cvs/eabi-patch-4 b/meta/packages/glibc/glibc-cvs/eabi-patch-4
deleted file mode 100644
index 45166ef960..0000000000
--- a/meta/packages/glibc/glibc-cvs/eabi-patch-4
+++ /dev/null
@@ -1,64 +0,0 @@
1From libc-alpha-return-17230-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Tue Mar 22 16:25:01 2005
2Return-Path: <libc-alpha-return-17230-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
3Delivered-To: listarch-libc-alpha at sources dot redhat dot com
4Received: (qmail 7764 invoked by alias); 22 Mar 2005 16:24:20 -0000
5Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
6Precedence: bulk
7List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
8List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
9List-Post: <mailto:libc-alpha at sources dot redhat dot com>
10List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
11Sender: libc-alpha-owner at sources dot redhat dot com
12Delivered-To: mailing list libc-alpha at sources dot redhat dot com
13Received: (qmail 7316 invoked from network); 22 Mar 2005 16:23:45 -0000
14Received: from unknown (HELO nevyn.them.org) (66.93.172.17)
15 by sourceware dot org with SMTP; 22 Mar 2005 16:23:45 -0000
16Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
17 id 1DDmAg-000798-P7
18 for <libc-alpha at sources dot redhat dot com>; Tue, 22 Mar 2005 11:23:58 -0500
19Date: Tue, 22 Mar 2005 11:23:58 -0500
20From: Daniel Jacobowitz <drow at false dot org>
21To: libc-alpha at sources dot redhat dot com
22Subject: Re: Define PT_ARM_EXIDX
23Message-ID: <20050322162358.GA27424@nevyn.them.org>
24Mail-Followup-To: libc-alpha at sources dot redhat dot com
25References: <20050322155140.GA25312@nevyn.them.org>
26Mime-Version: 1.0
27Content-Type: text/plain; charset=us-ascii
28Content-Disposition: inline
29In-Reply-To: <20050322155140 dot GA25312 at nevyn dot them dot org>
30User-Agent: Mutt/1.5.6+20040907i
31
32On Tue, Mar 22, 2005 at 10:51:40AM -0500, Daniel Jacobowitz wrote:
33> The ARM EABI uses a program header to locate exception tables for shared
34> objects, just like PT_GNU_EH_FRAME. But the format is a little different,
35> and the header is above PT_LOPROC because it was assigned by a processor
36> vendor. This just adds the constant to elf/elf.h.
37
38Oops, Ulrich pointed out that I put the constant in the wrong place.
39
40--
41Daniel Jacobowitz
42CodeSourcery, LLC
43
442005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
45
46 * elf/elf.h (PT_ARM_EXIDX): Define.
47
48Index: glibc/elf/elf.h
49===================================================================
50--- glibc.orig/elf/elf.h 2005-03-22 11:21:34.961464117 -0500
51+++ glibc/elf/elf.h 2005-03-22 11:22:49.872172922 -0500
52@@ -2138,7 +2138,11 @@ typedef Elf32_Addr Elf32_Conflict;
53 #define PF_ARM_SB 0x10000000 /* Segment contains the location
54 addressed by the static base */
55
56+/* Processor specific values for the Phdr p_type field. */
57+#define PT_ARM_EXIDX 0x70000001 /* .ARM.exidx segment */
58+
59 /* ARM relocs. */
60+
61 #define R_ARM_NONE 0 /* No reloc */
62 #define R_ARM_PC24 1 /* PC relative 26 bit branch */
63 #define R_ARM_ABS32 2 /* Direct 32 bit */
64
diff --git a/meta/packages/glibc/glibc-cvs/etc/ld.so.conf b/meta/packages/glibc/glibc-cvs/etc/ld.so.conf
deleted file mode 100644
index 3f9b41aabb..0000000000
--- a/meta/packages/glibc/glibc-cvs/etc/ld.so.conf
+++ /dev/null
@@ -1,3 +0,0 @@
1/usr/local/lib
2/opt/QtPalmtop/lib
3
diff --git a/meta/packages/glibc/glibc-cvs/glibc-fp-byteorder.patch b/meta/packages/glibc/glibc-cvs/glibc-fp-byteorder.patch
deleted file mode 100644
index f20432ea8b..0000000000
--- a/meta/packages/glibc/glibc-cvs/glibc-fp-byteorder.patch
+++ /dev/null
@@ -1,203 +0,0 @@
1Taken from http://sources.redhat.com/ml/crossgcc/2004-02/msg00104.html
2Author: addsub@eyou.com
3Target: ARM
4
5Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c
6and makes printf("%f", 1.0) work.
7
8Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00115.html :
9 It ... fixes the 'printf("%f\n", 0.5); prints 0.000000' and general 'floating point
10 is broken' on my big-endian hardfloat FPA ARM platform. ...
11 It's definitely needed for hardfloat. So I'd think it's needed for
12 big-endian systems in any case, and for VFP on little-endian systems
13 too. Someone would have to verify that though.
14
15Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00123.html
16 I just had a look at glibc-20040830, and [this patch] is still needed and useful
17 for this version. glibc-20040830 out-of-the-box still contains the
18 following wrong assumptions:
19 - sysdeps/arm/bits/endian.h: float word order is big endian (which it is
20 not on vfp systems)
21 - sysdeps/arm/gmp-mparam.h: IEEE doubles are mixed endian (which they
22 are not on big endian systems, neither on vfp systems)
23 - sysdeps/arm/ieee754.h: IEEE doubles are in little endian byte order
24 (which they are not on big endian systems)
25 [This patch] seems the right solution for all of these issues.
26
27Dimitry Andric wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00132.html :
28 It's even needed for glibc CVS, AFAICS.
29 The patch hunk which modifies glibc.new/sysdeps/arm/bits/endian.h
30 (currently at version 1.4) is only needed for proper VFP operation.
31 But the hunk which modifies sysdeps/arm/gmp-mparam.h, and the hunk
32 that deletes sysdeps/arm/ieee754.h (yes, this IS correct), are needed
33 for proper operation of *any* FP model on big endian ARM.
34
35See also discussion in followups to
36http://sources.redhat.com/ml/crossgcc/2004-05/msg00245.html)
37
38Message-ID: <276985760.37584@eyou.com>
39Received: from unknown (HELO eyou.com) (172.16.2.2)
40 by 0.0.0.0 with SMTP; Tue, 17 Feb 2004 10:42:40 +0800
41Received: (qmail 8238 invoked by uid 65534); 17 Feb 2004 10:42:38 +0800
42Date: 17 Feb 2004 10:42:38 +0800
43Message-ID: <20040217104238.8237.qmail@eyou.com>
44From: "add" <addsub@eyou.com>
45To: dank@kegel.com
46Reply-To: "add" <addsub@eyou.com>
47Subject: Re:&nbsp;&nbsp;&nbsp;problem&nbsp;while&nbsp;building&nbsp;arm&nbsp;vfp&nbsp;softfloat&nbsp;gcc&nbsp;`
48
49Hi, Dan, This is a patch I applied to my glibc-2.3.2, then my softfloat
50toolchain can printf("%f\n",1.0). So you may have a try of this
51
52
53diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h
54--- glibc.old/sysdeps/arm/bits/endian.h 1999-04-12 11:59:13.000000000 -0400
55+++ glibc.new/sysdeps/arm/bits/endian.h 2004-02-12 09:15:13.000000000 -0500
56@@ -9,4 +9,9 @@
57 #else
58 #define __BYTE_ORDER __LITTLE_ENDIAN
59 #endif
60+
61+#ifdef __VFP_FP__
62+#define __FLOAT_WORD_ORDER __BYTE_ORDER
63+#else
64 #define __FLOAT_WORD_ORDER __BIG_ENDIAN
65+#endif
66diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h
67--- glibc.old/sysdeps/arm/gmp-mparam.h 2001-07-07 15:21:19.000000000 -0400
68+++ glibc.new/sysdeps/arm/gmp-mparam.h 2004-02-12 09:15:13.000000000 -0500
69@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
70 #define BITS_PER_SHORTINT 16
71 #define BITS_PER_CHAR 8
72
73-#define IEEE_DOUBLE_BIG_ENDIAN 0
74-#define IEEE_DOUBLE_MIXED_ENDIAN 1
75+#if defined(__ARMEB__)
76+# define IEEE_DOUBLE_MIXED_ENDIAN 0
77+# define IEEE_DOUBLE_BIG_ENDIAN 1
78+#elif defined(__VFP_FP__)
79+# define IEEE_DOUBLE_MIXED_ENDIAN 0
80+# define IEEE_DOUBLE_BIG_ENDIAN 0
81+#else
82+# define IEEE_DOUBLE_BIG_ENDIAN 0
83+# define IEEE_DOUBLE_MIXED_ENDIAN 1
84+#endif
85diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h
86--- glibc.old/sysdeps/arm/ieee754.h 2001-07-07 15:21:19.000000000 -0400
87+++ glibc.new/sysdeps/arm/ieee754.h 1969-12-31 19:00:00.000000000 -0500
88@@ -1,115 +0,0 @@
89-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
90- This file is part of the GNU C Library.
91-
92- The GNU C Library is free software; you can redistribute it and/or
93- modify it under the terms of the GNU Lesser General Public
94- License as published by the Free Software Foundation; either
95- version 2.1 of the License, or (at your option) any later version.
96-
97- The GNU C Library is distributed in the hope that it will be useful,
98- but WITHOUT ANY WARRANTY; without even the implied warranty of
99- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
100- Lesser General Public License for more details.
101-
102- You should have received a copy of the GNU Lesser General Public
103- License along with the GNU C Library; if not, write to the Free
104- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
105- 02111-1307 USA. */
106-
107-#ifndef _IEEE754_H
108-
109-#define _IEEE754_H 1
110-#include <features.h>
111-
112-#include <endian.h>
113-
114-__BEGIN_DECLS
115-
116-union ieee754_float
117- {
118- float f;
119-
120- /* This is the IEEE 754 single-precision format. */
121- struct
122- {
123- unsigned int mantissa:23;
124- unsigned int exponent:8;
125- unsigned int negative:1;
126- } ieee;
127-
128- /* This format makes it easier to see if a NaN is a signalling NaN. */
129- struct
130- {
131- unsigned int mantissa:22;
132- unsigned int quiet_nan:1;
133- unsigned int exponent:8;
134- unsigned int negative:1;
135- } ieee_nan;
136- };
137-
138-#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
139-
140-
141-union ieee754_double
142- {
143- double d;
144-
145- /* This is the IEEE 754 double-precision format. */
146- struct
147- {
148- unsigned int mantissa0:20;
149- unsigned int exponent:11;
150- unsigned int negative:1;
151- unsigned int mantissa1:32;
152- } ieee;
153-
154- /* This format makes it easier to see if a NaN is a signalling NaN. */
155- struct
156- {
157- unsigned int mantissa0:19;
158- unsigned int quiet_nan:1;
159- unsigned int exponent:11;
160- unsigned int negative:1;
161- unsigned int mantissa1:32;
162- } ieee_nan;
163- };
164-
165-#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
166-
167-
168-/* The following two structures are correct for `new' floating point systems but
169- wrong for the old FPPC. The only solution seems to be to avoid their use on
170- old hardware. */
171-
172-union ieee854_long_double
173- {
174- long double d;
175-
176- /* This is the IEEE 854 double-extended-precision format. */
177- struct
178- {
179- unsigned int exponent:15;
180- unsigned int empty:16;
181- unsigned int negative:1;
182- unsigned int mantissa1:32;
183- unsigned int mantissa0:32;
184- } ieee;
185-
186- /* This is for NaNs in the IEEE 854 double-extended-precision format. */
187- struct
188- {
189- unsigned int exponent:15;
190- unsigned int empty:16;
191- unsigned int negative:1;
192- unsigned int mantissa1:32;
193- unsigned int mantissa0:30;
194- unsigned int quiet_nan:1;
195- unsigned int one:1;
196- } ieee_nan;
197- };
198-
199-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
200-
201-__END_DECLS
202-
203-#endif /* ieee754.h */
diff --git a/meta/packages/glibc/glibc-cvs/ldconfig.patch b/meta/packages/glibc/glibc-cvs/ldconfig.patch
deleted file mode 100644
index c60b9b1432..0000000000
--- a/meta/packages/glibc/glibc-cvs/ldconfig.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1--- elf/ldconfig.c 2003-07-08 23:26:27.000000000 +0900
2+++ elf/ldconfig.c.debian 2003-07-08 23:29:43.000000000 +0900
3@@ -920,26 +920,24 @@
4 {
5 FILE *file = NULL;
6 char *line = NULL;
7- const char *canon;
8+ const char *canon = filename;
9 size_t len = 0;
10+ int file_fd;
11
12 if (opt_chroot)
13 {
14 canon = chroot_canon (opt_chroot, filename);
15- if (canon)
16- file = fopen (canon, "r");
17- else
18+ if (!canon)
19 canon = filename;
20 }
21- else
22- {
23- canon = filename;
24- file = fopen (filename, "r");
25- }
26+
27+ if ((file_fd = open(canon, O_RDONLY | O_EXCL, 0022)) != -1)
28+ file = fdopen (file_fd, "r");
29
30 if (file == NULL)
31 {
32- error (0, errno, _("Can't open configuration file %s"), canon);
33+ if (opt_verbose)
34+ error (0, errno, _("Can't open configuration file %s"), canon);
35 if (canon != filename)
36 free ((char *) canon);
37 return;
diff --git a/meta/packages/glibc/glibc-cvs/ldd.patch b/meta/packages/glibc/glibc-cvs/ldd.patch
deleted file mode 100644
index 01719dbe08..0000000000
--- a/meta/packages/glibc/glibc-cvs/ldd.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1--- elf/ldd.bash.in~ Tue Apr 3 21:43:31 2001
2+++ elf/ldd.bash.in Tue Apr 3 21:54:15 2001
3@@ -32,6 +32,7 @@
4 warn=
5 bind_now=
6 verbose=
7+filename_magic_regex="((^|/)lib|.so$)"
8
9 while test $# -gt 0; do
10 case "$1" in
11@@ -123,8 +124,11 @@
12 echo "ldd: ${file}:" $"No such file or directory" >&2
13 result=1
14 elif test -r "$file"; then
15- test -x "$file" || echo 'ldd:' $"\
16-warning: you do not have execution permission for" "\`$file'" >&2
17+ if test ! -x "$file" && eval echo "$file" \
18+ | egrep -v "$filename_magic_regex" > /dev/null; then
19+ echo 'ldd:' $"warning: you do not have execution permission for"\
20+ "\`$file'" >&2
21+ fi
22 RTLD=
23 for rtld in ${RTLDLIST}; do
24 if test -x $rtld; then
25@@ -143,7 +147,12 @@
26 fi
27 case $ret in
28 0)
29- eval $add_env '"$file"' || result=1
30+ if [ ! -x "$file" ] && eval file -L "$file" 2>/dev/null \
31+ | sed 10q | egrep "$file_magic_regex" > /dev/null; then
32+ eval $add_env ${RTLD} '"$file"' || result=1
33+ else
34+ eval $add_env '"$file"' || result=1
35+ fi
36 ;;
37 1)
38 # This can be a non-ELF binary or no binary at all.
diff --git a/meta/packages/glibc/glibc-cvs/ldsocache-varrun.patch b/meta/packages/glibc/glibc-cvs/ldsocache-varrun.patch
deleted file mode 100644
index 9994d4f879..0000000000
--- a/meta/packages/glibc/glibc-cvs/ldsocache-varrun.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1This patch moves ld.so.cache from /etc to /var/run. This is for devices
2where /etc is JFFS2 or CRAMFS but /var is a ramdisk.
3
4#
5# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
6#
7
8--- libc/sysdeps/generic/dl-cache.h~ldsocache-varrun
9+++ libc/sysdeps/generic/dl-cache.h
10@@ -29,7 +29,7 @@
11 #endif
12
13 #ifndef LD_SO_CACHE
14-# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache"
15+# define LD_SO_CACHE "/var/run/ld.so.cache"
16 #endif
17
18 #ifndef add_system_dir
diff --git a/meta/packages/glibc/glibc-cvs/makeconfig.patch b/meta/packages/glibc/glibc-cvs/makeconfig.patch
deleted file mode 100644
index 4365878e95..0000000000
--- a/meta/packages/glibc/glibc-cvs/makeconfig.patch
+++ /dev/null
@@ -1,15 +0,0 @@
1--- Makeconfig~ 2001/09/12 18:49:45 1.265
2+++ Makeconfig 2001/10/07 20:56:17
3@@ -532,10 +532,11 @@
4 $(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
5 $(filter -Wl$(comma)-rpath-link=%,\
6 $(sysdep-LDFLAGS)))))
7+ld_envlib_path = $(shell test x$$LD_LIBRARY_PATH = x || echo -n :$$LD_LIBRARY_PATH)
8 run-program-prefix = $(if $(filter $(notdir $(built-program-file)),\
9 $(tests-static)),, \
10 $(elf-objpfx)$(rtld-installed-name) \
11- --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)))
12+ --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path))$(ld_envlib_path))
13 else
14 run-program-prefix =
15 endif
diff --git a/meta/packages/glibc/glibc-cvs/mips-no-throw.patch b/meta/packages/glibc/glibc-cvs/mips-no-throw.patch
deleted file mode 100644
index 99a316eeac..0000000000
--- a/meta/packages/glibc/glibc-cvs/mips-no-throw.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1--- sysdeps/unix/sysv/linux/mips/bits/socket.h.orig 2004-09-15 14:27:06.342572280 +0200
2+++ sysdeps/unix/sysv/linux/mips/bits/socket.h 2004-09-15 14:27:28.162255184 +0200
3@@ -261,7 +261,7 @@
4 # define _EXTERN_INLINE extern __inline
5 # endif
6 _EXTERN_INLINE struct cmsghdr *
7-__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
8+__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)
9 {
10 if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
11 /* The kernel header does this so there may be a reason. */
12--- sysdeps/unix/sysv/linux/mips/sys/tas.h.orig 2004-09-15 14:27:41.809180536 +0200
13+++ sysdeps/unix/sysv/linux/mips/sys/tas.h 2004-09-15 14:27:53.245441960 +0200
14@@ -35,7 +35,7 @@
15 # endif
16
17 _EXTERN_INLINE int
18-_test_and_set (int *p, int v) __THROW
19+_test_and_set (int *p, int v)
20 {
21 int r, t;
22
diff --git a/meta/packages/glibc/glibc-cvs/noinfo.patch b/meta/packages/glibc/glibc-cvs/noinfo.patch
deleted file mode 100644
index 6aa0e64d96..0000000000
--- a/meta/packages/glibc/glibc-cvs/noinfo.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1--- glibc-2.3.2/manual/Makefile~noinfo
2+++ glibc-2.3.2/manual/Makefile
3@@ -25,7 +25,7 @@
4 INSTALL_INFO = install-info
5
6 .PHONY: all dvi pdf info html
7-all: dvi
8+all:
9 dvi: libc.dvi
10 pdf: libc.pdf
11
12@@ -41,7 +41,7 @@
13 TEXI2PDF = texi2dvi --pdf
14
15 ifneq ($(strip $(MAKEINFO)),:)
16-all: info
17+all:
18 info: libc.info dir-add.info
19 endif
20
21@@ -176,28 +176,14 @@
22 -rm -f top-menu.texi chapters.texi
23
24 .PHONY: install subdir_install installdirs install-data
25-install-data subdir_install: install
26+install-data subdir_install:
27 ifneq ($(strip $(MAKEINFO)),:)
28 # There are two variants of install-info out there. The GNU version
29 # knows about the INFO-DIR-SECTION tag, the Debian version doesn't.
30 ifneq ($(OLD_DEBIAN_INSTALL_INFO),yes)
31-install: $(inst_infodir)/libc.info dir-add.info
32- @if $(SHELL) -c '$(INSTALL_INFO) --version' >/dev/null 2>&1; then \
33- test -f $(inst_infodir)/dir || $(INSTALL_DATA) dir $(inst_infodir);\
34- $(INSTALL_INFO) --info-dir=$(inst_infodir) $(inst_infodir)/libc.info;\
35- $(INSTALL_INFO) --info-dir=$(inst_infodir) dir-add.info;\
36- else : ; fi
37+install:
38 else
39-install: $(inst_infodir)/libc.info dir-add.info
40- @if $(SHELL) -c '$(INSTALL_INFO) --version' >/dev/null 2>&1; then \
41- test -f $(inst_infodir)/dir || $(INSTALL_DATA) dir $(inst_infodir);\
42- $(INSTALL_INFO) --info-dir=$(inst_infodir) \
43- --section '^GNU Libraries:' 'GNU Libraries:' \
44- $(inst_infodir)/libc.info;\
45- $(INSTALL_INFO) --info-dir=$(inst_infodir) \
46- --section '^GNU C Library functions:' 'GNU C Library functions:' \
47- dir-add.info;\
48- else : ; fi
49+install:
50 endif
51 endif
52 # Catchall implicit rule for other installation targets from the parent.
diff --git a/meta/packages/glibc/glibc-cvs/trampoline.patch b/meta/packages/glibc/glibc-cvs/trampoline.patch
deleted file mode 100644
index 86cfc0a539..0000000000
--- a/meta/packages/glibc/glibc-cvs/trampoline.patch
+++ /dev/null
@@ -1,560 +0,0 @@
1From libc-alpha-return-16890-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Wed Jan 19 18:02:53 2005
2Return-Path: <libc-alpha-return-16890-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
3Delivered-To: listarch-libc-alpha at sources dot redhat dot com
4Received: (qmail 26073 invoked by alias); 19 Jan 2005 18:02:41 -0000
5Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
6Precedence: bulk
7List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
8List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
9List-Post: <mailto:libc-alpha at sources dot redhat dot com>
10List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
11Sender: libc-alpha-owner at sources dot redhat dot com
12Delivered-To: mailing list libc-alpha at sources dot redhat dot com
13Received: (qmail 25420 invoked from network); 19 Jan 2005 18:01:47 -0000
14Received: from unknown (HELO mail.codesourcery.com) (65.74.133.9)
15 by sourceware dot org with SMTP; 19 Jan 2005 18:01:47 -0000
16Received: (qmail 7456 invoked from network); 19 Jan 2005 18:01:44 -0000
17Received: from localhost (HELO ?192.168.0.100?) (mitchell@127.0.0.1)
18 by mail dot codesourcery dot com with SMTP; 19 Jan 2005 18:01:44 -0000
19Message-ID: <41EEA082.1020000@codesourcery.com>
20Date: Wed, 19 Jan 2005 10:01:38 -0800
21From: Mark Mitchell <mark at codesourcery dot com>
22Organization: CodeSourcery, LLC
23User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103)
24MIME-Version: 1.0
25To: Daniel Jacobowitz <drow at false dot org>
26CC: libc-alpha at sources dot redhat dot com
27Subject: Re: PATCH: ARM dl-trampoline.S
28References: <200501191631.j0JGVVRA002591@sirius.codesourcery.com> <20050119170217.GA3137@nevyn.them.org>
29In-Reply-To: <20050119170217 dot GA3137 at nevyn dot them dot org>
30Content-Type: multipart/mixed;
31 boundary="------------050601050507020101060100"
32
33This is a multi-part message in MIME format.
34--------------050601050507020101060100
35Content-Type: text/plain; charset=ISO-8859-1; format=flowed
36Content-Transfer-Encoding: 7bit
37
38Daniel Jacobowitz wrote:
39> On Wed, Jan 19, 2005 at 08:31:31AM -0800, Mark Mitchell wrote:
40>
41>>This patch updates the ARM port for the recent dl-trampoline.S and
42>>link.h changes. OK to apply?
43>
44>
45> Did you test this? I'm pretty sure that RESOLVE_MAP returns a link
46> map, unlike RESOLVE.
47
48No, I didn't test -- except by building glibc. (There are other
49problems at the moment, AFAICT, with actually running the library on ARM.)
50
51However, you're definitely correct -- good catch! -- and, in fact, in
52looking at my logs I see compiler warnings about the mismatched type
53assignment. Here is a more plausible version. How about this one?
54
55Thanks,
56
57--
58Mark Mitchell
59CodeSourcery, LLC
60mark@codesourcery.com
61(916) 791-8304
62
63--------------050601050507020101060100
64Content-Type: text/plain;
65 name="glibc.patch"
66Content-Transfer-Encoding: 7bit
67Content-Disposition: inline;
68 filename="glibc.patch"
69
702005-01-19 Mark Mitchell <mark@codesourcery.com>
71
72 * elf/tst-auditmod1.c: Add ARM support.
73 * sysdeps/arm/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE):
74 Remove.
75 (RESOLVE): Do not use it; use ...
76 (RESOLVE_MAP): ... instead.
77 (ARCH_LA_PLTENTER): Define.
78 (ARCH_LA_PLTEXIT): Likewise.
79 (elf_machine_rel): Use RESOLVE_MAP, not RESOLVE.
80 (elf_machine_rela): Likewise.
81 * sysdeps/arm/dl-trampoline.S: New file.
82 * sysdeps/arm/bits/link.h: Likewise.
83 * sysdeps/generic/ldsodefs.h (struct La_arm_regs): Declare.
84 (struct audit_ifaces): Add ARM functions.
85
86Index: elf/tst-auditmod1.c
87===================================================================
88RCS file: /cvs/glibc/libc/elf/tst-auditmod1.c,v
89retrieving revision 1.7
90diff -c -5 -p -r1.7 tst-auditmod1.c
91*** elf/tst-auditmod1.c 16 Jan 2005 06:24:59 -0000 1.7
92--- elf/tst-auditmod1.c 19 Jan 2005 17:54:32 -0000
93*************** la_symbind64 (Elf64_Sym *sym, unsigned i
94*** 100,110 ****
95 symname, (long int) sym->st_value, ndx, *flags);
96
97 return sym->st_value;
98 }
99
100! #ifdef __i386__
101 # define pltenter la_i86_gnu_pltenter
102 # define pltexit la_i86_gnu_pltexit
103 # define La_regs La_i86_regs
104 # define La_retval La_i86_retval
105 # define int_retval lrv_eax
106--- 100,116 ----
107 symname, (long int) sym->st_value, ndx, *flags);
108
109 return sym->st_value;
110 }
111
112! #ifdef __arm__
113! # define pltenter la_arm_gnu_plteneter
114! # define pltext la_arm_gnu_pltexit
115! # define La_regs La_arm_regs
116! # define La_retval La_arm_retval
117! # define int_retval lvr_r0
118! #elif defined __i386__
119 # define pltenter la_i86_gnu_pltenter
120 # define pltexit la_i86_gnu_pltexit
121 # define La_regs La_i86_regs
122 # define La_retval La_i86_retval
123 # define int_retval lrv_eax
124Index: sysdeps/arm/dl-trampoline.S
125===================================================================
126RCS file: sysdeps/arm/dl-trampoline.S
127diff -N sysdeps/arm/dl-trampoline.S
128*** /dev/null 1 Jan 1970 00:00:00 -0000
129--- sysdeps/arm/dl-trampoline.S 19 Jan 2005 17:54:32 -0000
130***************
131*** 0 ****
132--- 1,135 ----
133+ /* PLT trampolines. ARM version.
134+ Copyright (C) 2005 Free Software Foundation, Inc.
135+ This file is part of the GNU C Library.
136+
137+ The GNU C Library is free software; you can redistribute it and/or
138+ modify it under the terms of the GNU Lesser General Public
139+ License as published by the Free Software Foundation; either
140+ version 2.1 of the License, or (at your option) any later version.
141+
142+ The GNU C Library is distributed in the hope that it will be useful,
143+ but WITHOUT ANY WARRANTY; without even the implied warranty of
144+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
145+ Lesser General Public License for more details.
146+
147+ You should have received a copy of the GNU Lesser General Public
148+ License along with the GNU C Library; if not, write to the Free
149+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
150+ 02111-1307 USA. */
151+
152+ #include <sysdep.h>
153+
154+ #if defined(__USE_BX__)
155+ #define BX(x) bx x
156+ #else
157+ #define BX(x) mov pc, x
158+ #endif
159+
160+ #ifndef PROF
161+ .text
162+ .globl _dl_runtime_resolve
163+ .type _dl_runtime_resolve, #function
164+ .align 2
165+ _dl_runtime_resolve:
166+ @ we get called with
167+ @ stack[0] contains the return address from this call
168+ @ ip contains &GOT[n+3] (pointer to function)
169+ @ lr points to &GOT[2]
170+
171+ @ stack arguments
172+ stmdb sp!,{r0-r3}
173+
174+ @ get pointer to linker struct
175+ ldr r0, [lr, #-4]
176+
177+ @ prepare to call _dl_fixup()
178+ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
179+ sub r1, ip, lr
180+ sub r1, r1, #4
181+ add r1, r1, r1
182+
183+ @ call fixup routine
184+ bl _dl_fixup
185+
186+ @ save the return
187+ mov ip, r0
188+
189+ @ get arguments and return address back
190+ ldmia sp!, {r0-r3,lr}
191+
192+ @ jump to the newly found address
193+ BX(ip)
194+
195+ .size _dl_runtime_resolve, .-_dl_runtime_resolve
196+
197+ .globl _dl_runtime_profile
198+ .type _dl_runtime_profile, #function
199+ .align 2
200+ _dl_runtime_profile:
201+ @ stack arguments
202+ stmdb sp!, {r0-r3}
203+
204+ @ get pointer to linker struct
205+ ldr r0, [lr, #-4]
206+
207+ @ prepare to call _dl_profile_fixup()
208+ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
209+ sub r1, ip, lr
210+ sub r1, r1, #4
211+ add r1, r1, r1
212+
213+ @ call profiling fixup routine
214+ bl _dl_profile_fixup
215+
216+ @ save the return
217+ mov ip, r0
218+
219+ @ get arguments and return address back
220+ ldmia sp!, {r0-r3,lr}
221+
222+ @ jump to the newly found address
223+ BX(ip)
224+
225+ .size _dl_runtime_resolve, .-_dl_runtime_resolve
226+ .previous
227+ #else
228+ .text
229+ .globl _dl_runtime_resolve
230+ .globl _dl_runtime_profile
231+ .type _dl_runtime_resolve, #function
232+ .type _dl_runtime_profile, #function
233+ .align 2
234+ _dl_runtime_resolve:
235+ _dl_runtime_profile:
236+ @ we get called with
237+ @ stack[0] contains the return address from this call
238+ @ ip contains &GOT[n+3] (pointer to function)
239+ @ lr points to &GOT[2]
240+
241+ @ stack arguments
242+ stmdb sp!, {r0-r3}
243+
244+ @ get pointer to linker struct
245+ ldr r0, [lr, #-4]
246+
247+ @ prepare to call _dl_fixup()
248+ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
249+ sub r1, ip, lr
250+ sub r1, r1, #4
251+ add r1, r1, r1
252+
253+ @ call profiling fixup routine
254+ bl _dl_fixup
255+
256+ @ save the return
257+ mov ip, r0
258+
259+ @ get arguments and return address back
260+ ldmia sp!, {r0-r3,lr}
261+
262+ @ jump to the newly found address
263+ BX(ip)
264+
265+ .size _dl_runtime_profile, .-_dl_runtime_profile
266+ .previous
267+ #endif
268Index: sysdeps/arm/bits/link.h
269===================================================================
270RCS file: /cvs/glibc/libc/sysdeps/arm/bits/link.h,v
271retrieving revision 1.2
272diff -c -5 -p -r1.2 link.h
273*** sysdeps/arm/bits/link.h 6 Jan 2005 22:40:20 -0000 1.2
274--- sysdeps/arm/bits/link.h 19 Jan 2005 17:54:32 -0000
275***************
276*** 0 ****
277--- 1,57 ----
278+ /* Copyright (C) 2005 Free Software Foundation, Inc.
279+ This file is part of the GNU C Library.
280+
281+ The GNU C Library is free software; you can redistribute it and/or
282+ modify it under the terms of the GNU Lesser General Public
283+ License as published by the Free Software Foundation; either
284+ version 2.1 of the License, or (at your option) any later version.
285+
286+ The GNU C Library is distributed in the hope that it will be useful,
287+ but WITHOUT ANY WARRANTY; without even the implied warranty of
288+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
289+ Lesser General Public License for more details.
290+
291+ You should have received a copy of the GNU Lesser General Public
292+ License along with the GNU C Library; if not, write to the Free
293+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
294+ 02111-1307 USA. */
295+
296+ #ifndef _LINK_H
297+ # error "Never include <bits/link.h> directly; use <link.h> instead."
298+ #endif
299+
300+
301+ /* Registers for entry into PLT on ARM. */
302+ typedef struct La_arm_regs
303+ {
304+ uint32_t lvr_r0;
305+ uint32_t lvr_r1;
306+ uint32_t lvr_r2;
307+ uint32_t lvr_r3;
308+ } La_arm_regs;
309+
310+ /* Return values for calls from PLT on ARM. */
311+ typedef struct La_arm_retval
312+ {
313+ uint32_t lvr_r0;
314+ uint32_t lvr_r1;
315+ } La_arm_retval;
316+
317+
318+ __BEGIN_DECLS
319+
320+ extern Elf32_Addr la_arm_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
321+ uintptr_t *__refcook,
322+ uintptr_t *__defcook,
323+ La_arm_regs *__regs,
324+ unsigned int *__flags,
325+ const char *__symname,
326+ long int *__framesizep);
327+ extern unsigned int la_arm_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
328+ uintptr_t *__refcook,
329+ uintptr_t *__defcook,
330+ const La_arm_regs *__inregs,
331+ La_arm_retval *__outregs,
332+ const char *symname);
333+
334+ __END_DECLS
335Index: sysdeps/generic/ldsodefs.h
336===================================================================
337RCS file: /cvs/glibc/libc/sysdeps/generic/ldsodefs.h,v
338retrieving revision 1.112
339diff -c -5 -p -r1.112 ldsodefs.h
340*** sysdeps/generic/ldsodefs.h 16 Jan 2005 02:07:29 -0000 1.112
341--- sysdeps/generic/ldsodefs.h 19 Jan 2005 17:54:32 -0000
342*************** enum allowmask
343*** 173,182 ****
344--- 173,183 ----
345 allow_ldso = 8
346 };
347
348
349 /* Type for list of auditing interfaces. */
350+ struct La_arm_regs;
351 struct La_i86_regs;
352 struct La_i86_retval;
353 struct La_x86_64_regs;
354 struct La_x86_64_retval;
355 struct La_ppc32_regs;
356*************** struct audit_ifaces
357*** 202,211 ****
358--- 203,216 ----
359 uintptr_t (*symbind64) (Elf64_Sym *, unsigned int, uintptr_t *,
360 uintptr_t *, unsigned int *, const char *);
361 };
362 union
363 {
364+ Elf32_Addr (*arm_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *,
365+ uintptr_t *, struct La_arm_regs *,
366+ unsigned int *, const char *name,
367+ long int *framesizep);
368 Elf32_Addr (*i86_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *,
369 uintptr_t *, struct La_i86_regs *,
370 unsigned int *, const char *name,
371 long int *framesizep);
372 Elf64_Addr (*x86_64_gnu_pltenter) (Elf64_Sym *, unsigned int, uintptr_t *,
373*************** struct audit_ifaces
374*** 229,238 ****
375--- 234,246 ----
376 unsigned int *, const char *name,
377 long int *framesizep);
378 };
379 union
380 {
381+ unsigned int (*arm_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *,
382+ uintptr_t *, const struct La_arm_regs *,
383+ struct La_i86_retval *, const char *);
384 unsigned int (*i86_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *,
385 uintptr_t *, const struct La_i86_regs *,
386 struct La_i86_retval *, const char *);
387 unsigned int (*x86_64_gnu_pltexit) (Elf64_Sym *, unsigned int, uintptr_t *,
388 uintptr_t *,
389
390--------------050601050507020101060100--
391
392diff -u -r1.52 dl-machine.h
393--- sysdeps/arm/dl-machine.h 15 Mar 2005 22:57:26 -0000 1.52
394+++ sysdeps/arm/dl-machine.h 22 Apr 2005 03:38:15 -0000
395@@ -129,119 +129,6 @@
396 #define BX(x) "mov\tpc, " #x
397 #endif
398
399-#ifndef PROF
400-# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
401- .text\n\
402- .globl _dl_runtime_resolve\n\
403- .type _dl_runtime_resolve, #function\n\
404- .align 2\n\
405-_dl_runtime_resolve:\n\
406- @ we get called with\n\
407- @ stack[0] contains the return address from this call\n\
408- @ ip contains &GOT[n+3] (pointer to function)\n\
409- @ lr points to &GOT[2]\n\
410-\n\
411- @ stack arguments\n\
412- stmdb sp!,{r0-r3}\n\
413-\n\
414- @ get pointer to linker struct\n\
415- ldr r0, [lr, #-4]\n\
416-\n\
417- @ prepare to call fixup()\n\
418- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
419- sub r1, ip, lr\n\
420- sub r1, r1, #4\n\
421- add r1, r1, r1\n\
422-\n\
423- @ call fixup routine\n\
424- bl fixup\n\
425-\n\
426- @ save the return\n\
427- mov ip, r0\n\
428-\n\
429- @ get arguments and return address back\n\
430- ldmia sp!, {r0-r3,lr}\n\
431-\n\
432- @ jump to the newly found address\n\
433- " BX(ip) "\n\
434-\n\
435- .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
436-\n\
437- .globl _dl_runtime_profile\n\
438- .type _dl_runtime_profile, #function\n\
439- .align 2\n\
440-_dl_runtime_profile:\n\
441- @ stack arguments\n\
442- stmdb sp!, {r0-r3}\n\
443-\n\
444- @ get pointer to linker struct\n\
445- ldr r0, [lr, #-4]\n\
446-\n\
447- @ prepare to call fixup()\n\
448- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
449- sub r1, ip, lr\n\
450- sub r1, r1, #4\n\
451- add r1, r1, r1\n\
452-\n\
453- @ call profiling fixup routine\n\
454- bl profile_fixup\n\
455-\n\
456- @ save the return\n\
457- mov ip, r0\n\
458-\n\
459- @ get arguments and return address back\n\
460- ldmia sp!, {r0-r3,lr}\n\
461-\n\
462- @ jump to the newly found address\n\
463- " BX(ip) "\n\
464-\n\
465- .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
466- .previous\n\
467-");
468-#else // PROF
469-# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
470- .text\n\
471- .globl _dl_runtime_resolve\n\
472- .globl _dl_runtime_profile\n\
473- .type _dl_runtime_resolve, #function\n\
474- .type _dl_runtime_profile, #function\n\
475- .align 2\n\
476-_dl_runtime_resolve:\n\
477-_dl_runtime_profile:\n\
478- @ we get called with\n\
479- @ stack[0] contains the return address from this call\n\
480- @ ip contains &GOT[n+3] (pointer to function)\n\
481- @ lr points to &GOT[2]\n\
482-\n\
483- @ stack arguments\n\
484- stmdb sp!, {r0-r3}\n\
485-\n\
486- @ get pointer to linker struct\n\
487- ldr r0, [lr, #-4]\n\
488-\n\
489- @ prepare to call fixup()\n\
490- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
491- sub r1, ip, lr\n\
492- sub r1, r1, #4\n\
493- add r1, r1, r1\n\
494-\n\
495- @ call profiling fixup routine\n\
496- bl fixup\n\
497-\n\
498- @ save the return\n\
499- mov ip, r0\n\
500-\n\
501- @ get arguments and return address back\n\
502- ldmia sp!, {r0-r3,lr}\n\
503-\n\
504- @ jump to the newly found address\n\
505- " BX(ip) "\n\
506-\n\
507- .size _dl_runtime_profile, .-_dl_runtime_profile\n\
508- .previous\n\
509-");
510-#endif //PROF
511-
512 /* Mask identifying addresses reserved for the user program,
513 where the dynamic linker should not map anything. */
514 #define ELF_MACHINE_USER_ADDRESS_MASK 0xf8000000UL
515@@ -348,6 +235,10 @@
516 return value;
517 }
518
519+/* Names of the architecture-specific auditing callback functions. */
520+#define ARCH_LA_PLTENTER arm_gnu_pltenter
521+#define ARCH_LA_PLTEXIT arm_gnu_pltexit
522+
523 #endif /* !dl_machine_h */
524
525
526@@ -355,7 +246,7 @@
527 Prelinked libraries may use Elf32_Rela though. */
528 #define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP
529
530-#ifdef RESOLVE
531+#ifdef RESOLVE_MAP
532
533 /* Deal with an out-of-range PC24 reloc. */
534 static Elf32_Addr
535@@ -425,7 +316,8 @@
536 #endif
537 {
538 const Elf32_Sym *const refsym = sym;
539- Elf32_Addr value = RESOLVE (&sym, version, r_type);
540+ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
541+ Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value;
542 if (sym)
543 value += sym->st_value;
544
545@@ -535,7 +427,8 @@
546 # ifndef RESOLVE_CONFLICT_FIND_MAP
547 const Elf32_Sym *const refsym = sym;
548 # endif
549- Elf32_Addr value = RESOLVE (&sym, version, r_type);
550+ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
551+ Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value;
552 if (sym)
553 value += sym->st_value;
554
555@@ -637,4 +530,4 @@
556 _dl_reloc_bad_type (map, r_type, 1);
557 }
558
559-#endif /* RESOLVE */
560+#endif /* RESOLVE_MAP */