glibc: Drop unused directory

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2943 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Richard Purdie
2007-10-21 19:18:05 +00:00
parent ecf406813a
commit 5c0507f126
20 changed files with 0 additions and 4912 deletions

View File

@@ -1,13 +0,0 @@
--- sysdeps/unix/sysv/linux/arm/ioperm.c 20 Feb 2003 22:22:35 -0000 1.6
+++ sysdeps/unix/sysv/linux/arm/ioperm.c 24 Oct 2003 20:59:38 -0000
@@ -100,8 +100,8 @@
{
char systype[256];
int i, n;
- static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
- static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
+ static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
+ static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
size_t len = sizeof(io.base);
if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)

View File

@@ -1,59 +0,0 @@
--- stdlib/longlong.h~ 2002-09-29 18:45:58.000000000 +0100
+++ stdlib/longlong.h 2004-03-20 19:16:44.000000000 +0000
@@ -210,6 +210,14 @@
"rI" ((USItype) (bh)), \
"r" ((USItype) (al)), \
"rI" ((USItype) (bl)))
+/* v3m and all higher arches have long multiply support. */
+#if !defined(__ARM_ARCH_2__) && !defined(__ARM_ARCH_3__)
+#define umul_ppmm(xh, xl, a, b) \
+ __asm__ ("umull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b))
+#define UMUL_TIME 5
+#define smul_ppmm(xh, xl, a, b) \
+ __asm__ ("smull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b))
+#else
#define umul_ppmm(xh, xl, a, b) \
{register USItype __t0, __t1, __t2; \
__asm__ ("%@ Inlined umul_ppmm\n" \
@@ -231,7 +239,14 @@
: "r" ((USItype) (a)), \
"r" ((USItype) (b)));}
#define UMUL_TIME 20
+#endif
#define UDIV_TIME 100
+
+#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__)
+#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X))
+#define COUNT_LEADING_ZEROS_0 32
+#endif
+
#endif /* __arm__ */
#if defined (__hppa) && W_TYPE_SIZE == 32
--- /dev/null 2004-02-02 20:32:13.000000000 +0000
+++ sysdeps/arm/mp_clz_tab.c 2004-03-20 19:24:26.000000000 +0000
@@ -0,0 +1,24 @@
+/* __clz_tab -- support for longlong.h
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__)
+/* Nothing required. */
+#else
+#include <sysdeps/generic/mp_clz_tab.c>
+#endif

View File

@@ -1,11 +0,0 @@
--- sysdeps/arm/machine-gmon.h~ 2001-07-06 00:55:48.000000000 -0400
+++ sysdeps/arm/machine-gmon.h 2004-04-25 03:56:20.000000000 -0400
@@ -35,7 +35,7 @@
static void mcount_internal (u_long frompc, u_long selfpc);
#define _MCOUNT_DECL(frompc, selfpc) \
-static void mcount_internal (u_long frompc, u_long selfpc)
+static __attribute__((used)) void mcount_internal (u_long frompc, u_long selfpc)
/* This macro/func MUST save r0, r1 because the compiler inserts
blind calls to _mount(), ignoring the fact that _mcount may

View File

@@ -1,758 +0,0 @@
--- /dev/null 2004-02-02 20:32:13.000000000 +0000
+++ sysdeps/arm/memmove.S 2004-03-20 18:37:23.000000000 +0000
@@ -0,0 +1,251 @@
+/*
+ * Optimized memmove implementation for ARM processors
+ *
+ * Author: Nicolas Pitre
+ * Created: Dec 23, 2003
+ * Copyright: (C) MontaVista Software, Inc.
+ *
+ * This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ */
+
+#include <sysdep.h>
+
+
+/*
+ * Endian independent macros for shifting bytes within registers.
+ */
+#ifndef __ARMEB__
+#define pull lsr
+#define push lsl
+#else
+#define pull lsl
+#define push lsr
+#endif
+
+/*
+ * Enable data preload for architectures that support it (ARMv5 and above)
+ */
+#if defined(__ARM_ARCH_5__) || \
+ defined(__ARM_ARCH_5T__) || \
+ defined(__ARM_ARCH_5TE__)
+#define PLD(code...) code
+#else
+#define PLD(code...)
+#endif
+
+
+/* char * memmove (char *dst, const char *src) */
+ENTRY(memmove)
+ subs ip, r0, r1
+ cmphi r2, ip
+ bls memcpy(PLT)
+
+ stmfd sp!, {r0, r4, lr}
+ add r1, r1, r2
+ add r0, r0, r2
+ subs r2, r2, #4
+ blt 25f
+ ands ip, r0, #3
+ PLD( pld [r1, #-4] )
+ bne 26f
+ ands ip, r1, #3
+ bne 27f
+
+19: subs r2, r2, #4
+ blt 24f
+ subs r2, r2, #8
+ blt 23f
+ subs r2, r2, #16
+ blt 22f
+
+ PLD( pld [r1, #-32] )
+ PLD( subs r2, r2, #96 )
+ stmfd sp!, {r5 - r8}
+ PLD( blt 21f )
+
+ PLD( @ cache alignment )
+ PLD( ands ip, r1, #31 )
+ PLD( pld [r1, #-64] )
+ PLD( beq 20f )
+ PLD( cmp r2, ip )
+ PLD( pld [r1, #-96] )
+ PLD( blt 20f )
+ PLD( cmp ip, #16 )
+ PLD( sub r2, r2, ip )
+ PLD( ldmgedb r1!, {r3 - r6} )
+ PLD( stmgedb r0!, {r3 - r6} )
+ PLD( beq 20f )
+ PLD( and ip, ip, #15 )
+ PLD( cmp ip, #8 )
+ PLD( ldr r3, [r1, #-4]! )
+ PLD( ldrge r4, [r1, #-4]! )
+ PLD( ldrgt r5, [r1, #-4]! )
+ PLD( str r3, [r0, #-4]! )
+ PLD( strge r4, [r0, #-4]! )
+ PLD( strgt r5, [r0, #-4]! )
+
+20: PLD( pld [r1, #-96] )
+ PLD( pld [r1, #-128] )
+21: ldmdb r1!, {r3, r4, ip, lr}
+ subs r2, r2, #32
+ stmdb r0!, {r3, r4, ip, lr}
+ ldmdb r1!, {r3, r4, ip, lr}
+ stmgedb r0!, {r3, r4, ip, lr}
+ ldmgedb r1!, {r3, r4, ip, lr}
+ stmgedb r0!, {r3, r4, ip, lr}
+ ldmgedb r1!, {r3, r4, ip, lr}
+ subges r2, r2, #32
+ stmdb r0!, {r3, r4, ip, lr}
+ bge 20b
+ PLD( cmn r2, #96 )
+ PLD( bge 21b )
+ PLD( add r2, r2, #96 )
+ tst r2, #31
+ ldmfd sp!, {r5 - r8}
+ ldmeqfd sp!, {r0, r4, pc}
+
+ tst r2, #16
+22: ldmnedb r1!, {r3, r4, ip, lr}
+ stmnedb r0!, {r3, r4, ip, lr}
+
+ tst r2, #8
+23: ldmnedb r1!, {r3, r4}
+ stmnedb r0!, {r3, r4}
+
+ tst r2, #4
+24: ldrne r3, [r1, #-4]!
+ strne r3, [r0, #-4]!
+
+25: ands r2, r2, #3
+ ldmeqfd sp!, {r0, r4, pc}
+
+ cmp r2, #2
+ ldrb r3, [r1, #-1]
+ ldrgeb r4, [r1, #-2]
+ ldrgtb ip, [r1, #-3]
+ strb r3, [r0, #-1]
+ strgeb r4, [r0, #-2]
+ strgtb ip, [r0, #-3]
+ ldmfd sp!, {r0, r4, pc}
+
+26: cmp ip, #2
+ ldrb r3, [r1, #-1]!
+ ldrgeb r4, [r1, #-1]!
+ ldrgtb lr, [r1, #-1]!
+ strb r3, [r0, #-1]!
+ strgeb r4, [r0, #-1]!
+ strgtb lr, [r0, #-1]!
+ subs r2, r2, ip
+ blt 25b
+ ands ip, r1, #3
+ beq 19b
+
+27: bic r1, r1, #3
+ cmp ip, #2
+ ldr r3, [r1]
+ beq 35f
+ blt 36f
+
+
+ .macro backward_copy_shift push pull
+
+ cmp r2, #12
+ PLD( pld [r1, #-4] )
+ blt 33f
+ subs r2, r2, #28
+ stmfd sp!, {r5 - r9}
+ blt 31f
+
+ PLD( subs r2, r2, #96 )
+ PLD( pld [r1, #-32] )
+ PLD( blt 30f )
+ PLD( pld [r1, #-64] )
+
+ PLD( @ cache alignment )
+ PLD( ands ip, r1, #31 )
+ PLD( pld [r1, #-96] )
+ PLD( beq 29f )
+ PLD( cmp r2, ip )
+ PLD( pld [r1, #-128] )
+ PLD( blt 29f )
+ PLD( sub r2, r2, ip )
+28: PLD( mov r4, r3, push #\push )
+ PLD( ldr r3, [r1, #-4]! )
+ PLD( subs ip, ip, #4 )
+ PLD( orr r4, r4, r3, pull #\pull )
+ PLD( str r4, [r0, #-4]! )
+ PLD( bgt 28b )
+
+29: PLD( pld [r1, #-128] )
+30: mov lr, r3, push #\push
+ ldmdb r1!, {r3 - r9, ip}
+ subs r2, r2, #32
+ orr lr, lr, ip, pull #\pull
+ mov ip, ip, push #\push
+ orr ip, ip, r9, pull #\pull
+ mov r9, r9, push #\push
+ orr r9, r9, r8, pull #\pull
+ mov r8, r8, push #\push
+ orr r8, r8, r7, pull #\pull
+ mov r7, r7, push #\push
+ orr r7, r7, r6, pull #\pull
+ mov r6, r6, push #\push
+ orr r6, r6, r5, pull #\pull
+ mov r5, r5, push #\push
+ orr r5, r5, r4, pull #\pull
+ mov r4, r4, push #\push
+ orr r4, r4, r3, pull #\pull
+ stmdb r0!, {r4 - r9, ip, lr}
+ bge 29b
+ PLD( cmn r2, #96 )
+ PLD( bge 30b )
+ PLD( add r2, r2, #96 )
+ cmn r2, #16
+ blt 32f
+31: mov r7, r3, push #\push
+ ldmdb r1!, {r3 - r6}
+ sub r2, r2, #16
+ orr r7, r7, r6, pull #\pull
+ mov r6, r6, push #\push
+ orr r6, r6, r5, pull #\pull
+ mov r5, r5, push #\push
+ orr r5, r5, r4, pull #\pull
+ mov r4, r4, push #\push
+ orr r4, r4, r3, pull #\pull
+ stmdb r0!, {r4 - r7}
+32: adds r2, r2, #28
+ ldmfd sp!, {r5 - r9}
+ blt 34f
+33: mov r4, r3, push #\push
+ ldr r3, [r1, #-4]!
+ subs r2, r2, #4
+ orr r4, r4, r3, pull #\pull
+ str r4, [r0, #-4]!
+ bge 33b
+34:
+ .endm
+
+
+ backward_copy_shift push=8 pull=24
+ add r1, r1, #3
+ b 25b
+
+35: backward_copy_shift push=16 pull=16
+ add r1, r1, #2
+ b 25b
+
+36: backward_copy_shift push=24 pull=8
+ add r1, r1, #1
+ b 25b
+
+ .size memmove, . - memmove
+END(memmove)
+libc_hidden_builtin_def (memmove)
--- /dev/null 2004-02-02 20:32:13.000000000 +0000
+++ sysdeps/arm/bcopy.S 2004-03-20 18:37:48.000000000 +0000
@@ -0,0 +1,255 @@
+/*
+ * Optimized memmove implementation for ARM processors
+ *
+ * Author: Nicolas Pitre
+ * Created: Dec 23, 2003
+ * Copyright: (C) MontaVista Software, Inc.
+ *
+ * This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ */
+
+#include <sysdep.h>
+
+
+/*
+ * Endian independent macros for shifting bytes within registers.
+ */
+#ifndef __ARMEB__
+#define pull lsr
+#define push lsl
+#else
+#define pull lsl
+#define push lsr
+#endif
+
+/*
+ * Enable data preload for architectures that support it (ARMv5 and above)
+ */
+#if defined(__ARM_ARCH_5__) || \
+ defined(__ARM_ARCH_5T__) || \
+ defined(__ARM_ARCH_5TE__)
+#define PLD(code...) code
+#else
+#define PLD(code...)
+#endif
+
+dst .req r1
+src .req r0
+
+/* void *bcopy (const char *src, char *dst, size_t size) */
+ENTRY(bcopy)
+ subs ip, dst, src
+ cmphi r2, ip
+ movls r3, r0
+ movls r0, r1
+ movls r1, r3
+ bls memcpy(PLT)
+
+ stmfd sp!, {r4, lr}
+ add src, src, r2
+ add dst, dst, r2
+ subs r2, r2, #4
+ blt 25f
+ ands ip, dst, #3
+ PLD( pld [src, #-4] )
+ bne 26f
+ ands ip, src, #3
+ bne 27f
+
+19: subs r2, r2, #4
+ blt 24f
+ subs r2, r2, #8
+ blt 23f
+ subs r2, r2, #16
+ blt 22f
+
+ PLD( pld [src, #-32] )
+ PLD( subs r2, r2, #96 )
+ stmfd sp!, {r5 - r8}
+ PLD( blt 21f )
+
+ PLD( @ cache alignment )
+ PLD( ands ip, src, #31 )
+ PLD( pld [src, #-64] )
+ PLD( beq 20f )
+ PLD( cmp r2, ip )
+ PLD( pld [src, #-96] )
+ PLD( blt 20f )
+ PLD( cmp ip, #16 )
+ PLD( sub r2, r2, ip )
+ PLD( ldmgedb src!, {r3 - r6} )
+ PLD( stmgedb dst!, {r3 - r6} )
+ PLD( beq 20f )
+ PLD( and ip, ip, #15 )
+ PLD( cmp ip, #8 )
+ PLD( ldr r3, [src, #-4]! )
+ PLD( ldrge r4, [src, #-4]! )
+ PLD( ldrgt r5, [src, #-4]! )
+ PLD( str r3, [dst, #-4]! )
+ PLD( strge r4, [dst, #-4]! )
+ PLD( strgt r5, [dst, #-4]! )
+
+20: PLD( pld [src, #-96] )
+ PLD( pld [src, #-128] )
+21: ldmdb src!, {r3, r4, ip, lr}
+ subs r2, r2, #32
+ stmdb dst!, {r3, r4, ip, lr}
+ ldmdb src!, {r3, r4, ip, lr}
+ stmgedb dst!, {r3, r4, ip, lr}
+ ldmgedb src!, {r3, r4, ip, lr}
+ stmgedb dst!, {r3, r4, ip, lr}
+ ldmgedb src!, {r3, r4, ip, lr}
+ subges r2, r2, #32
+ stmdb dst!, {r3, r4, ip, lr}
+ bge 20b
+ PLD( cmn r2, #96 )
+ PLD( bge 21b )
+ PLD( add r2, r2, #96 )
+ tst r2, #31
+ ldmfd sp!, {r5 - r8}
+ ldmeqfd sp!, {r4, pc}
+
+ tst r2, #16
+22: ldmnedb src!, {r3, r4, ip, lr}
+ stmnedb dst!, {r3, r4, ip, lr}
+
+ tst r2, #8
+23: ldmnedb src!, {r3, r4}
+ stmnedb dst!, {r3, r4}
+
+ tst r2, #4
+24: ldrne r3, [src, #-4]!
+ strne r3, [dst, #-4]!
+
+25: ands r2, r2, #3
+ ldmeqfd sp!, {dst, r4, pc}
+
+ cmp r2, #2
+ ldrb r3, [src, #-1]
+ ldrgeb r4, [src, #-2]
+ ldrgtb ip, [src, #-3]
+ strb r3, [dst, #-1]
+ strgeb r4, [dst, #-2]
+ strgtb ip, [dst, #-3]
+ ldmfd sp!, {dst, r4, pc}
+
+26: cmp ip, #2
+ ldrb r3, [src, #-1]!
+ ldrgeb r4, [src, #-1]!
+ ldrgtb lr, [src, #-1]!
+ strb r3, [dst, #-1]!
+ strgeb r4, [dst, #-1]!
+ strgtb lr, [dst, #-1]!
+ subs r2, r2, ip
+ blt 25b
+ ands ip, src, #3
+ beq 19b
+
+27: bic src, src, #3
+ cmp ip, #2
+ ldr r3, [src]
+ beq 35f
+ blt 36f
+
+
+ .macro backward_copy_shift push pull
+
+ cmp r2, #12
+ PLD( pld [src, #-4] )
+ blt 33f
+ subs r2, r2, #28
+ stmfd sp!, {r5 - r9}
+ blt 31f
+
+ PLD( subs r2, r2, #96 )
+ PLD( pld [src, #-32] )
+ PLD( blt 30f )
+ PLD( pld [src, #-64] )
+
+ PLD( @ cache alignment )
+ PLD( ands ip, src, #31 )
+ PLD( pld [src, #-96] )
+ PLD( beq 29f )
+ PLD( cmp r2, ip )
+ PLD( pld [src, #-128] )
+ PLD( blt 29f )
+ PLD( sub r2, r2, ip )
+28: PLD( mov r4, r3, push #\push )
+ PLD( ldr r3, [src, #-4]! )
+ PLD( subs ip, ip, #4 )
+ PLD( orr r4, r4, r3, pull #\pull )
+ PLD( str r4, [dst, #-4]! )
+ PLD( bgt 28b )
+
+29: PLD( pld [src, #-128] )
+30: mov lr, r3, push #\push
+ ldmdb src!, {r3 - r9, ip}
+ subs r2, r2, #32
+ orr lr, lr, ip, pull #\pull
+ mov ip, ip, push #\push
+ orr ip, ip, r9, pull #\pull
+ mov r9, r9, push #\push
+ orr r9, r9, r8, pull #\pull
+ mov r8, r8, push #\push
+ orr r8, r8, r7, pull #\pull
+ mov r7, r7, push #\push
+ orr r7, r7, r6, pull #\pull
+ mov r6, r6, push #\push
+ orr r6, r6, r5, pull #\pull
+ mov r5, r5, push #\push
+ orr r5, r5, r4, pull #\pull
+ mov r4, r4, push #\push
+ orr r4, r4, r3, pull #\pull
+ stmdb dst!, {r4 - r9, ip, lr}
+ bge 29b
+ PLD( cmn r2, #96 )
+ PLD( bge 30b )
+ PLD( add r2, r2, #96 )
+ cmn r2, #16
+ blt 32f
+31: mov r7, r3, push #\push
+ ldmdb src!, {r3 - r6}
+ sub r2, r2, #16
+ orr r7, r7, r6, pull #\pull
+ mov r6, r6, push #\push
+ orr r6, r6, r5, pull #\pull
+ mov r5, r5, push #\push
+ orr r5, r5, r4, pull #\pull
+ mov r4, r4, push #\push
+ orr r4, r4, r3, pull #\pull
+ stmdb dst!, {r4 - r7}
+32: adds r2, r2, #28
+ ldmfd sp!, {r5 - r9}
+ blt 34f
+33: mov r4, r3, push #\push
+ ldr r3, [src, #-4]!
+ subs r2, r2, #4
+ orr r4, r4, r3, pull #\pull
+ str r4, [dst, #-4]!
+ bge 33b
+34:
+ .endm
+
+
+ backward_copy_shift push=8 pull=24
+ add src, src, #3
+ b 25b
+
+35: backward_copy_shift push=16 pull=16
+ add src, src, #2
+ b 25b
+
+36: backward_copy_shift push=24 pull=8
+ add src, src, #1
+ b 25b
+
+ .size bcopy, . - bcopy
+END(bcopy)
--- /dev/null 2004-02-02 20:32:13.000000000 +0000
+++ sysdeps/arm/memcpy.S 2004-05-02 14:33:22.000000000 +0100
@@ -0,0 +1,242 @@
+/*
+ * Optimized memcpy implementation for ARM processors
+ *
+ * Author: Nicolas Pitre
+ * Created: Dec 23, 2003
+ * Copyright: (C) MontaVista Software, Inc.
+ *
+ * This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ */
+
+#include <sysdep.h>
+
+
+/*
+ * Endian independent macros for shifting bytes within registers.
+ */
+#ifndef __ARMEB__
+#define pull lsr
+#define push lsl
+#else
+#define pull lsl
+#define push lsr
+#endif
+
+/*
+ * Enable data preload for architectures that support it (ARMv5 and above)
+ */
+#if defined(__ARM_ARCH_5__) || \
+ defined(__ARM_ARCH_5T__) || \
+ defined(__ARM_ARCH_5TE__)
+#define PLD(code...) code
+#else
+#define PLD(code...)
+#endif
+
+
+/* char * memcpy (char *dst, const char *src) */
+
+ENTRY(memcpy)
+ subs r2, r2, #4
+ stmfd sp!, {r0, r4, lr}
+ blt 7f
+ ands ip, r0, #3
+ PLD( pld [r1, #0] )
+ bne 8f
+ ands ip, r1, #3
+ bne 9f
+
+1: subs r2, r2, #4
+ blt 6f
+ subs r2, r2, #8
+ blt 5f
+ subs r2, r2, #16
+ blt 4f
+
+ PLD( subs r2, r2, #65 )
+ stmfd sp!, {r5 - r8}
+ PLD( blt 3f )
+ PLD( pld [r1, #32] )
+
+ PLD( @ cache alignment )
+ PLD( ands ip, r1, #31 )
+ PLD( pld [r1, #64] )
+ PLD( beq 2f )
+ PLD( rsb ip, ip, #32 )
+ PLD( cmp r2, ip )
+ PLD( pld [r1, #96] )
+ PLD( blt 2f )
+ PLD( cmp ip, #16 )
+ PLD( sub r2, r2, ip )
+ PLD( ldmgeia r1!, {r3 - r6} )
+ PLD( stmgeia r0!, {r3 - r6} )
+ PLD( beq 2f )
+ PLD( and ip, ip, #15 )
+ PLD( cmp ip, #8 )
+ PLD( ldr r3, [r1], #4 )
+ PLD( ldrge r4, [r1], #4 )
+ PLD( ldrgt r5, [r1], #4 )
+ PLD( str r3, [r0], #4 )
+ PLD( strge r4, [r0], #4 )
+ PLD( strgt r5, [r0], #4 )
+
+2: PLD( pld [r1, #96] )
+3: ldmia r1!, {r3 - r8, ip, lr}
+ subs r2, r2, #32
+ stmia r0!, {r3 - r8, ip, lr}
+ bge 2b
+ PLD( cmn r2, #65 )
+ PLD( bge 3b )
+ PLD( add r2, r2, #65 )
+ tst r2, #31
+ ldmfd sp!, {r5 - r8}
+ ldmeqfd sp!, {r0, r4, pc}
+
+ tst r2, #16
+4: ldmneia r1!, {r3, r4, ip, lr}
+ stmneia r0!, {r3, r4, ip, lr}
+
+ tst r2, #8
+5: ldmneia r1!, {r3, r4}
+ stmneia r0!, {r3, r4}
+
+ tst r2, #4
+6: ldrne r3, [r1], #4
+ strne r3, [r0], #4
+
+7: ands r2, r2, #3
+ ldmeqfd sp!, {r0, r4, pc}
+
+ cmp r2, #2
+ ldrb r3, [r1], #1
+ ldrgeb r4, [r1], #1
+ ldrgtb ip, [r1]
+ strb r3, [r0], #1
+ strgeb r4, [r0], #1
+ strgtb ip, [r0]
+ ldmfd sp!, {r0, r4, pc}
+
+8: rsb ip, ip, #4
+ cmp ip, #2
+ ldrb r3, [r1], #1
+ ldrgeb r4, [r1], #1
+ ldrgtb lr, [r1], #1
+ strb r3, [r0], #1
+ strgeb r4, [r0], #1
+ strgtb lr, [r0], #1
+ subs r2, r2, ip
+ blt 7b
+ ands ip, r1, #3
+ beq 1b
+
+9: bic r1, r1, #3
+ cmp ip, #2
+ ldr lr, [r1], #4
+ beq 17f
+ bgt 18f
+
+
+ .macro forward_copy_shift pull push
+
+ cmp r2, #12
+ PLD( pld [r1, #0] )
+ blt 15f
+ subs r2, r2, #28
+ stmfd sp!, {r5 - r9}
+ blt 13f
+
+ PLD( subs r2, r2, #97 )
+ PLD( blt 12f )
+ PLD( pld [r1, #32] )
+
+ PLD( @ cache alignment )
+ PLD( rsb ip, r1, #36 )
+ PLD( pld [r1, #64] )
+ PLD( ands ip, ip, #31 )
+ PLD( pld [r1, #96] )
+ PLD( beq 11f )
+ PLD( cmp r2, ip )
+ PLD( pld [r1, #128] )
+ PLD( blt 11f )
+ PLD( sub r2, r2, ip )
+10: PLD( mov r3, lr, pull #\pull )
+ PLD( ldr lr, [r1], #4 )
+ PLD( subs ip, ip, #4 )
+ PLD( orr r3, r3, lr, push #\push )
+ PLD( str r3, [r0], #4 )
+ PLD( bgt 10b )
+
+11: PLD( pld [r1, #128] )
+12: mov r3, lr, pull #\pull
+ ldmia r1!, {r4 - r9, ip, lr}
+ subs r2, r2, #32
+ orr r3, r3, r4, push #\push
+ mov r4, r4, pull #\pull
+ orr r4, r4, r5, push #\push
+ mov r5, r5, pull #\pull
+ orr r5, r5, r6, push #\push
+ mov r6, r6, pull #\pull
+ orr r6, r6, r7, push #\push
+ mov r7, r7, pull #\pull
+ orr r7, r7, r8, push #\push
+ mov r8, r8, pull #\pull
+ orr r8, r8, r9, push #\push
+ mov r9, r9, pull #\pull
+ orr r9, r9, ip, push #\push
+ mov ip, ip, pull #\pull
+ orr ip, ip, lr, push #\push
+ stmia r0!, {r3 - r9, ip}
+ bge 11b
+ PLD( cmn r2, #97 )
+ PLD( bge 12b )
+ PLD( add r2, r2, #97 )
+ cmn r2, #16
+ blt 14f
+13: mov r3, lr, pull #\pull
+ ldmia r1!, {r4 - r6, lr}
+ sub r2, r2, #16
+ orr r3, r3, r4, push #\push
+ mov r4, r4, pull #\pull
+ orr r4, r4, r5, push #\push
+ mov r5, r5, pull #\pull
+ orr r5, r5, r6, push #\push
+ mov r6, r6, pull #\pull
+ orr r6, r6, lr, push #\push
+ stmia r0!, {r3 - r6}
+14: adds r2, r2, #28
+ ldmfd sp!, {r5 - r9}
+ blt 16f
+15: mov r3, lr, pull #\pull
+ ldr lr, [r1], #4
+ subs r2, r2, #4
+ orr r3, r3, lr, push #\push
+ str r3, [r0], #4
+ bge 15b
+16:
+ .endm
+
+
+ forward_copy_shift pull=8 push=24
+ sub r1, r1, #3
+ b 7b
+
+17: forward_copy_shift pull=16 push=16
+ sub r1, r1, #2
+ b 7b
+
+18: forward_copy_shift pull=24 push=8
+ sub r1, r1, #1
+ b 7b
+
+ .size memcpy, . - memcpy
+END(memcpy)
+libc_hidden_builtin_def (memcpy)
+

View File

@@ -1,11 +0,0 @@
--- sysdeps/unix/sysv/linux/arm/dl-procinfo.h Mon Jul 23 12:57:23 2001
+++ sysdeps/unix/sysv/linux/arm/dl-procinfo.h Sun Feb 10 06:37:00 2002
@@ -67,7 +67,7 @@
HWCAP_ARM_VFP = 1 << 6,
HWCAP_ARM_EDSP = 1 << 7,
- HWCAP_IMPORTANT = (HWCAP_ARM_HALF | HWCAP_ARM_FAST_MULT)
+ HWCAP_IMPORTANT = HWCAP_ARM_FAST_MULT
};
static inline int

View File

@@ -1,22 +0,0 @@
#
# Patch managed by http://www.holgerschurig.de/patcher.html
#
--- libc/elf/Makefile~dyn-ldconfig-20041128
+++ libc/elf/Makefile
@@ -118,12 +118,13 @@
ifeq (yes,$(use-ldconfig))
ifeq (yes,$(build-shared))
-others-static += ldconfig
+#others-static += ldconfig
others += ldconfig
install-rootsbin += ldconfig
ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon
extra-objs += $(ldconfig-modules:=.o)
+CPPFLAGS-readlib.c = -DNOT_IN_libc=1
# To find xmalloc.c and xstrdup.c
vpath %.c ../locale/programs

View File

@@ -1,62 +0,0 @@
--- elf/Makefile 13 Mar 2003 21:50:57 -0000 1.258
+++ elf/Makefile 27 Mar 2003 20:36:07 -0000
@@ -109,12 +109,13 @@
ifeq (yes,$(use-ldconfig))
ifeq (yes,$(build-shared))
-others-static += ldconfig
+#others-static += ldconfig
others += ldconfig
install-rootsbin += ldconfig
ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon
extra-objs += $(ldconfig-modules:=.o)
+CPPFLAGS-readlib.c = -DNOT_IN_libc=1
# To find xmalloc.c and xstrdup.c
vpath %.c ../locale/programs
--- elf/ldconfig.c 13 Jan 2003 08:53:14 -0000 1.31
+++ elf/ldconfig.c 27 Mar 2003 20:36:09 -0000
@@ -149,6 +149,9 @@
static int
is_hwcap_platform (const char *name)
{
+#if 1
+ return 0;
+#else
int hwcap_idx = _dl_string_hwcap (name);
if (hwcap_idx != -1 && ((1 << hwcap_idx) & hwcap_mask))
@@ -164,6 +167,7 @@
#endif
return 0;
+#endif
}
/* Get hwcap (including platform) encoding of path. */
@@ -175,6 +179,7 @@
uint64_t hwcap = 0;
uint64_t h;
+#if 0
size_t len;
len = strlen (str);
@@ -210,6 +215,7 @@
*ptr = '\0';
}
+#endif
free (str);
return hwcap;
}
--- elf/Versions.old 2004-06-26 13:18:35.000000000 +0100
+++ elf/Versions 2004-06-26 14:41:09.000000000 +0100
@@ -54,5 +54,6 @@
_dl_get_tls_static_info; _dl_allocate_tls_init;
_dl_tls_setup; _dl_rtld_di_serinfo;
_dl_make_stack_executable;
+ _dl_cache_libcmp;
}
}

View File

@@ -1,88 +0,0 @@
From 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
Return-Path: <libc-alpha-return-17227-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
Delivered-To: listarch-libc-alpha at sources dot redhat dot com
Received: (qmail 12343 invoked by alias); 22 Mar 2005 15:57:24 -0000
Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
Precedence: bulk
List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
List-Post: <mailto:libc-alpha at sources dot redhat dot com>
List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
Sender: libc-alpha-owner at sources dot redhat dot com
Delivered-To: mailing list libc-alpha at sources dot redhat dot com
Received: (qmail 12264 invoked from network); 22 Mar 2005 15:57:19 -0000
Received: from unknown (HELO nevyn.them.org) (66.93.172.17)
by sourceware dot org with SMTP; 22 Mar 2005 15:57:19 -0000
Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
id 1DDll5-0006ip-R3; Tue, 22 Mar 2005 10:57:31 -0500
Date: Tue, 22 Mar 2005 10:57:31 -0500
From: Daniel Jacobowitz <drow at false dot org>
To: libc-alpha at sources dot redhat dot com
Cc: Phil Blundell <pb at reciva dot com>
Subject: Common bits for the ARM EABI port
Message-ID: <20050322155731.GA25613@nevyn.them.org>
Mail-Followup-To: libc-alpha at sources dot redhat dot com,
Phil Blundell <pb at reciva dot com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.6+20040907i
The changes to common files for the ARM EABI port; search the new directory,
use GLIBC_2.4 as a base version, and generate ld-linux.so.3 (so that old and
new ABI libraries can be installed on the same system, in case someone needs
to do that). Generic ARM changes coming up next.
I noticed that the "configure: Regenerated" messages are often left out of
glibc changelogs; should I skip them?
--
Daniel Jacobowitz
CodeSourcery, LLC
2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
* configure.in: Add arm*-*-linux-gnueabi support. Remove
unused arm32 entry from $machine.
* configure: Regenerated.
* shlib-versions: Add arm*-*-linux-gnueabi.
Index: glibc/configure.in
===================================================================
--- glibc.orig/configure.in 2005-03-18 17:10:34.000000000 -0500
+++ glibc/configure.in 2005-03-21 10:04:41.000000000 -0500
@@ -423,7 +423,12 @@ changequote(,)dnl
test -n "$base_machine" || case "$machine" in
a29k | am29000) base_machine=a29k machine=a29k ;;
alpha*) base_machine=alpha machine=alpha/$machine ;;
-arm*) base_machine=arm machine=arm/arm32/$machine ;;
+arm*) base_machine=arm
+ case $config_os in
+ linux-gnueabi) machine=arm/eabi/$machine ;;
+ *) machine=arm/$machine ;;
+ esac
+ ;;
c3[012]) base_machine=cx0 machine=cx0/c30 ;;
c4[04]) base_machine=cx0 machine=cx0/c40 ;;
hppa*64*) base_machine=hppa machine=hppa/hppa64 ;;
Index: glibc/shlib-versions
===================================================================
--- glibc.orig/shlib-versions 2005-02-13 21:53:05.000000000 -0500
+++ glibc/shlib-versions 2005-03-21 10:06:54.000000000 -0500
@@ -31,6 +31,7 @@ cris-.*-linux.* DEFAULT GLIBC_2.2
x86_64-.*-linux.* DEFAULT GLIBC_2.2.5
powerpc64-.*-linux.* DEFAULT GLIBC_2.3
.*-.*-gnu-gnu.* DEFAULT GLIBC_2.2.6
+arm.*-.*-linux-gnueabi DEFAULT GLIBC_2.4
# Configuration WORDSIZE[32|64] Alternate configuration
# ------------- ---------- -----------------------
@@ -80,6 +81,7 @@ i.86-.*-linux.* ld=ld-linux.so.2
sparc64-.*-linux.* ld=ld-linux.so.2 GLIBC_2.2
sparc.*-.*-linux.* ld=ld-linux.so.2
alpha.*-.*-linux.* ld=ld-linux.so.2
+arm.*-.*-linux-gnueabi ld=ld-linux.so.3
arm.*-.*-linux.* ld=ld-linux.so.2
sh.*-.*-linux.* ld=ld-linux.so.2 GLIBC_2.2
ia64-.*-linux.* ld=ld-linux-ia64.so.2 GLIBC_2.2

File diff suppressed because it is too large Load Diff

View File

@@ -1,430 +0,0 @@
From 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
Return-Path: <libc-alpha-return-17228-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
Delivered-To: listarch-libc-alpha at sources dot redhat dot com
Received: (qmail 20972 invoked by alias); 22 Mar 2005 16:08:29 -0000
Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
Precedence: bulk
List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
List-Post: <mailto:libc-alpha at sources dot redhat dot com>
List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
Sender: libc-alpha-owner at sources dot redhat dot com
Delivered-To: mailing list libc-alpha at sources dot redhat dot com
Received: (qmail 20165 invoked from network); 22 Mar 2005 16:08:06 -0000
Received: from unknown (HELO nevyn.them.org) (66.93.172.17)
by sourceware dot org with SMTP; 22 Mar 2005 16:08:06 -0000
Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
id 1DDlvX-0006tE-Bh; Tue, 22 Mar 2005 11:08:19 -0500
Date: Tue, 22 Mar 2005 11:08:19 -0500
From: Daniel Jacobowitz <drow at false dot org>
To: libc-alpha at sources dot redhat dot com
Cc: Phil Blundell <pb at reciva dot com>
Subject: ARM EABI support - changes to existing ARM code
Message-ID: <20050322160819.GA26216@nevyn.them.org>
Mail-Followup-To: libc-alpha at sources dot redhat dot com,
Phil Blundell <pb at reciva dot com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.6+20040907i
This patch updates the common ARM files for EABI support. The changes are:
- Old ARM ABI targets always use FPA (mixed-endian) byte ordering. EABI
targets always use VFP byte ordering for doubles, which is standard
ieee754 layout. Removing the arm-specific ieee754.h doesn't break FPA;
it was a specialized version of the common header, which handles FPA
but also handles VFP.
- The stack needs to be aligned to eight bytes instead of just four,
including in mmap2 and when shifting _dl_argv.
- We need some markers around _start to indicate end-of-stack for the
unwinder - ARM EABI does not use either SJLJ exceptions or DWARF-2
exceptions. It uses a table based format which seems to be not
quite completely unlike DWARF-2.
Do these changes look OK?
--
Daniel Jacobowitz
CodeSourcery, LLC
2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/arm/bits/endian.h (__FLOAT_WORD_ORDER): Handle VFP.
* sysdeps/arm/gmp-mparam.h (IEEE_DOUBLE_BIG_ENDIAN,
IEEE_DOUBLE_MIXED_ENDIAN): Handle big-endian and VFP.
* sysdeps/arm/ieee754.h: Remove.
* sysdeps/arm/dl-machine.h (_dl_start_user): Align the stack to eight
bytes even when shifting arguments.
* sysdeps/arm/dl-sysdep.h: New file.
* sysdeps/arm/elf/start.S (_start): If not using SJLJ exceptions, include
EABI unwind markers to terminate unwinding.
* sysdeps/unix/sysv/linux/arm/mmap64.S: Handle big-endian byte ordering
and EABI stack layout.
Index: glibc/sysdeps/arm/bits/endian.h
===================================================================
--- glibc.orig/sysdeps/arm/bits/endian.h 2005-03-22 10:26:27.092978200 -0500
+++ glibc/sysdeps/arm/bits/endian.h 2005-03-22 10:27:39.457490903 -0500
@@ -9,4 +9,9 @@
#else
#define __BYTE_ORDER __LITTLE_ENDIAN
#endif
+
+#ifdef __VFP_FP__
+#define __FLOAT_WORD_ORDER __BYTE_ORDER
+#else
#define __FLOAT_WORD_ORDER __BIG_ENDIAN
+#endif
Index: glibc/sysdeps/arm/dl-machine.h
===================================================================
--- glibc.orig/sysdeps/arm/dl-machine.h 2005-03-22 10:26:27.092978200 -0500
+++ glibc/sysdeps/arm/dl-machine.h 2005-03-22 10:27:39.457490903 -0500
@@ -156,22 +156,19 @@ _dl_start_user:\n\
add sl, pc, sl\n\
.L_GOT_GOT:\n\
ldr r4, [sl, r4]\n\
- @ get the original arg count\n\
- ldr r1, [sp]\n\
@ save the entry point in another register\n\
mov r6, r0\n\
- @ adjust the stack pointer to skip the extra args\n\
- add sp, sp, r4, lsl #2\n\
- @ subtract _dl_skip_args from original arg count\n\
- sub r1, r1, r4\n\
+ @ get the original arg count\n\
+ ldr r1, [sp]\n\
@ get the argv address\n\
add r2, sp, #4\n\
- @ store the new argc in the new stack location\n\
- str r1, [sp]\n\
+ @ Fix up the stack if necessary.\n\
+ cmp r4, #0\n\
+ bne .L_fixup_stack\n\
+.L_done_fixup:\n\
@ compute envp\n\
add r3, r2, r1, lsl #2\n\
add r3, r3, #4\n\
-\n\
@ now we call _dl_init\n\
ldr r0, .L_LOADED\n\
ldr r0, [sl, r0]\n\
@@ -182,12 +179,45 @@ _dl_start_user:\n\
add r0, sl, r0\n\
@ jump to the user_s entry point\n\
" BX(r6) "\n\
+\n\
+ @ iWMMXt and EABI targets require the stack to be eight byte\n\
+ @ aligned - shuffle arguments etc.\n\
+.L_fixup_stack:\n\
+ @ subtract _dl_skip_args from original arg count\n\
+ sub r1, r1, r4\n\
+ @ store the new argc in the new stack location\n\
+ str r1, [sp]\n\
+ @ find the first unskipped argument\n\
+ mov r3, r2\n\
+ add r4, r2, r4, lsl #2\n\
+ @ shuffle argv down\n\
+1: ldr r5, [r4], #4\n\
+ str r5, [r3], #4\n\
+ cmp r5, #0\n\
+ bne 1b\n\
+ @ shuffle envp down\n\
+1: ldr r5, [r4], #4\n\
+ str r5, [r3], #4\n\
+ cmp r5, #0\n\
+ bne 1b\n\
+ @ shuffle auxv down\n\
+1: ldmia r4!, {r0, r5}\n\
+ stmia r3!, {r0, r5}\n\
+ cmp r0, #0\n\
+ bne 1b\n\
+ @ Update _dl_argv\n\
+ ldr r3, .L_ARGV\n\
+ str r2, [sl, r3]\n\
+ b .L_done_fixup\n\
+\n\
.L_GET_GOT:\n\
.word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4\n\
.L_SKIP_ARGS:\n\
.word _dl_skip_args(GOTOFF)\n\
.L_FINI_PROC:\n\
.word _dl_fini(GOTOFF)\n\
+.L_ARGV:\n\
+ .word _dl_argv(GOTOFF)\n\
.L_LOADED:\n\
.word _rtld_local(GOTOFF)\n\
.previous\n\
Index: glibc/sysdeps/arm/dl-sysdep.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ glibc/sysdeps/arm/dl-sysdep.h 2005-03-22 10:27:39.458490675 -0500
@@ -0,0 +1,41 @@
+/* System-specific settings for dynamic linker code. ARM version.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _DL_SYSDEP_H
+#define _DL_SYSDEP_H 1
+
+/* This macro must be defined to either 0 or 1.
+
+ If 1, then an errno global variable hidden in ld.so will work right with
+ all the errno-using libc code compiled for ld.so, and there is never a
+ need to share the errno location with libc. This is appropriate only if
+ all the libc functions that ld.so uses are called without PLT and always
+ get the versions linked into ld.so rather than the libc ones. */
+
+#ifdef IS_IN_rtld
+# define RTLD_PRIVATE_ERRNO 1
+#else
+# define RTLD_PRIVATE_ERRNO 0
+#endif
+
+/* _dl_argv cannot be attribute_relro, because _dl_start_user
+ might write into it after _dl_start returns. */
+#define DL_ARGV_NOT_RELRO 1
+
+#endif /* dl-sysdep.h */
Index: glibc/sysdeps/arm/elf/start.S
===================================================================
--- glibc.orig/sysdeps/arm/elf/start.S 2005-03-22 10:26:27.096977288 -0500
+++ glibc/sysdeps/arm/elf/start.S 2005-03-22 11:00:35.178522707 -0500
@@ -1,5 +1,6 @@
/* Startup code for ARM & ELF
- Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2005
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -62,6 +63,10 @@
.globl _start
.type _start,#function
_start:
+#if !defined(__USING_SJLJ_EXCEPTIONS__)
+ /* Protect against unhandled exceptions. */
+ .fnstart
+#endif
/* Fetch address of fini */
ldr ip, =__libc_csu_fini
@@ -93,6 +98,11 @@ _start:
/* should never get here....*/
bl abort
+#if !defined(__USING_SJLJ_EXCEPTIONS__)
+ .cantunwind
+ .fnend
+#endif
+
/* Define a symbol for the first piece of initialized data. */
.data
.globl __data_start
Index: glibc/sysdeps/arm/gmp-mparam.h
===================================================================
--- glibc.orig/sysdeps/arm/gmp-mparam.h 2005-03-22 10:26:27.092978200 -0500
+++ glibc/sysdeps/arm/gmp-mparam.h 2005-03-22 11:00:42.795683773 -0500
@@ -1,6 +1,6 @@
/* gmp-mparam.h -- Compiler/machine parameter header file.
-Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
+Copyright (C) 1991, 1993, 1994, 1995, 2005 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
#define BITS_PER_SHORTINT 16
#define BITS_PER_CHAR 8
-#define IEEE_DOUBLE_BIG_ENDIAN 0
-#define IEEE_DOUBLE_MIXED_ENDIAN 1
+#if defined(__ARMEB__)
+# define IEEE_DOUBLE_MIXED_ENDIAN 0
+# define IEEE_DOUBLE_BIG_ENDIAN 1
+#elif defined(__VFP_FP__)
+# define IEEE_DOUBLE_MIXED_ENDIAN 0
+# define IEEE_DOUBLE_BIG_ENDIAN 0
+#else
+# define IEEE_DOUBLE_BIG_ENDIAN 0
+# define IEEE_DOUBLE_MIXED_ENDIAN 1
+#endif
Index: glibc/sysdeps/arm/ieee754.h
===================================================================
--- glibc.orig/sysdeps/arm/ieee754.h 2005-03-22 10:26:27.092978200 -0500
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,115 +0,0 @@
-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _IEEE754_H
-
-#define _IEEE754_H 1
-#include <features.h>
-
-#include <endian.h>
-
-__BEGIN_DECLS
-
-union ieee754_float
- {
- float f;
-
- /* This is the IEEE 754 single-precision format. */
- struct
- {
- unsigned int mantissa:23;
- unsigned int exponent:8;
- unsigned int negative:1;
- } ieee;
-
- /* This format makes it easier to see if a NaN is a signalling NaN. */
- struct
- {
- unsigned int mantissa:22;
- unsigned int quiet_nan:1;
- unsigned int exponent:8;
- unsigned int negative:1;
- } ieee_nan;
- };
-
-#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
-
-
-union ieee754_double
- {
- double d;
-
- /* This is the IEEE 754 double-precision format. */
- struct
- {
- unsigned int mantissa0:20;
- unsigned int exponent:11;
- unsigned int negative:1;
- unsigned int mantissa1:32;
- } ieee;
-
- /* This format makes it easier to see if a NaN is a signalling NaN. */
- struct
- {
- unsigned int mantissa0:19;
- unsigned int quiet_nan:1;
- unsigned int exponent:11;
- unsigned int negative:1;
- unsigned int mantissa1:32;
- } ieee_nan;
- };
-
-#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
-
-
-/* The following two structures are correct for `new' floating point systems but
- wrong for the old FPPC. The only solution seems to be to avoid their use on
- old hardware. */
-
-union ieee854_long_double
- {
- long double d;
-
- /* This is the IEEE 854 double-extended-precision format. */
- struct
- {
- unsigned int exponent:15;
- unsigned int empty:16;
- unsigned int negative:1;
- unsigned int mantissa1:32;
- unsigned int mantissa0:32;
- } ieee;
-
- /* This is for NaNs in the IEEE 854 double-extended-precision format. */
- struct
- {
- unsigned int exponent:15;
- unsigned int empty:16;
- unsigned int negative:1;
- unsigned int mantissa1:32;
- unsigned int mantissa0:30;
- unsigned int quiet_nan:1;
- unsigned int one:1;
- } ieee_nan;
- };
-
-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
-
-__END_DECLS
-
-#endif /* ieee754.h */
Index: glibc/sysdeps/unix/sysv/linux/arm/mmap64.S
===================================================================
--- glibc.orig/sysdeps/unix/sysv/linux/arm/mmap64.S 2005-03-22 10:26:27.097977060 -0500
+++ glibc/sysdeps/unix/sysv/linux/arm/mmap64.S 2005-03-22 11:00:53.051209928 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,13 +23,28 @@
#include "kernel-features.h"
+#ifdef __ARM_EABI__
+# define INITIAL_OFFSET 8
+#else
+# define INITIAL_OFFSET 4
+#endif
+
+#ifdef __ARMEB__
+# define LOW_OFFSET INITIAL_OFFSET + 4
+/* The initial + 4 is for the stack postdecrement. */
+# define HIGH_OFFSET 4 + INITIAL_OFFSET + 0
+#else
+# define LOW_OFFSET INITIAL_OFFSET + 0
+# define HIGH_OFFSET 4 + INITIAL_OFFSET + 4
+#endif
+
/* The mmap2 system call takes six arguments, all in registers. */
.text
ENTRY (__mmap64)
#ifdef __NR_mmap2
- ldr ip, [sp, $4] @ offset low part
+ ldr ip, [sp, $LOW_OFFSET] @ offset low part
str r5, [sp, #-4]!
- ldr r5, [sp, $12] @ offset high part
+ ldr r5, [sp, $HIGH_OFFSET] @ offset high part
str r4, [sp, #-4]!
movs r4, ip, lsl $20 @ check that offset is page-aligned
mov ip, ip, lsr $12

View File

@@ -1,64 +0,0 @@
From 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
Return-Path: <libc-alpha-return-17230-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
Delivered-To: listarch-libc-alpha at sources dot redhat dot com
Received: (qmail 7764 invoked by alias); 22 Mar 2005 16:24:20 -0000
Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
Precedence: bulk
List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
List-Post: <mailto:libc-alpha at sources dot redhat dot com>
List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
Sender: libc-alpha-owner at sources dot redhat dot com
Delivered-To: mailing list libc-alpha at sources dot redhat dot com
Received: (qmail 7316 invoked from network); 22 Mar 2005 16:23:45 -0000
Received: from unknown (HELO nevyn.them.org) (66.93.172.17)
by sourceware dot org with SMTP; 22 Mar 2005 16:23:45 -0000
Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
id 1DDmAg-000798-P7
for <libc-alpha at sources dot redhat dot com>; Tue, 22 Mar 2005 11:23:58 -0500
Date: Tue, 22 Mar 2005 11:23:58 -0500
From: Daniel Jacobowitz <drow at false dot org>
To: libc-alpha at sources dot redhat dot com
Subject: Re: Define PT_ARM_EXIDX
Message-ID: <20050322162358.GA27424@nevyn.them.org>
Mail-Followup-To: libc-alpha at sources dot redhat dot com
References: <20050322155140.GA25312@nevyn.them.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050322155140 dot GA25312 at nevyn dot them dot org>
User-Agent: Mutt/1.5.6+20040907i
On Tue, Mar 22, 2005 at 10:51:40AM -0500, Daniel Jacobowitz wrote:
> The ARM EABI uses a program header to locate exception tables for shared
> objects, just like PT_GNU_EH_FRAME. But the format is a little different,
> and the header is above PT_LOPROC because it was assigned by a processor
> vendor. This just adds the constant to elf/elf.h.
Oops, Ulrich pointed out that I put the constant in the wrong place.
--
Daniel Jacobowitz
CodeSourcery, LLC
2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
* elf/elf.h (PT_ARM_EXIDX): Define.
Index: glibc/elf/elf.h
===================================================================
--- glibc.orig/elf/elf.h 2005-03-22 11:21:34.961464117 -0500
+++ glibc/elf/elf.h 2005-03-22 11:22:49.872172922 -0500
@@ -2138,7 +2138,11 @@ typedef Elf32_Addr Elf32_Conflict;
#define PF_ARM_SB 0x10000000 /* Segment contains the location
addressed by the static base */
+/* Processor specific values for the Phdr p_type field. */
+#define PT_ARM_EXIDX 0x70000001 /* .ARM.exidx segment */
+
/* ARM relocs. */
+
#define R_ARM_NONE 0 /* No reloc */
#define R_ARM_PC24 1 /* PC relative 26 bit branch */
#define R_ARM_ABS32 2 /* Direct 32 bit */

View File

@@ -1,3 +0,0 @@
/usr/local/lib
/opt/QtPalmtop/lib

View File

@@ -1,203 +0,0 @@
Taken from http://sources.redhat.com/ml/crossgcc/2004-02/msg00104.html
Author: addsub@eyou.com
Target: ARM
Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c
and makes printf("%f", 1.0) work.
Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00115.html :
It ... fixes the 'printf("%f\n", 0.5); prints 0.000000' and general 'floating point
is broken' on my big-endian hardfloat FPA ARM platform. ...
It's definitely needed for hardfloat. So I'd think it's needed for
big-endian systems in any case, and for VFP on little-endian systems
too. Someone would have to verify that though.
Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00123.html
I just had a look at glibc-20040830, and [this patch] is still needed and useful
for this version. glibc-20040830 out-of-the-box still contains the
following wrong assumptions:
- sysdeps/arm/bits/endian.h: float word order is big endian (which it is
not on vfp systems)
- sysdeps/arm/gmp-mparam.h: IEEE doubles are mixed endian (which they
are not on big endian systems, neither on vfp systems)
- sysdeps/arm/ieee754.h: IEEE doubles are in little endian byte order
(which they are not on big endian systems)
[This patch] seems the right solution for all of these issues.
Dimitry Andric wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00132.html :
It's even needed for glibc CVS, AFAICS.
The patch hunk which modifies glibc.new/sysdeps/arm/bits/endian.h
(currently at version 1.4) is only needed for proper VFP operation.
But the hunk which modifies sysdeps/arm/gmp-mparam.h, and the hunk
that deletes sysdeps/arm/ieee754.h (yes, this IS correct), are needed
for proper operation of *any* FP model on big endian ARM.
See also discussion in followups to
http://sources.redhat.com/ml/crossgcc/2004-05/msg00245.html)
Message-ID: <276985760.37584@eyou.com>
Received: from unknown (HELO eyou.com) (172.16.2.2)
by 0.0.0.0 with SMTP; Tue, 17 Feb 2004 10:42:40 +0800
Received: (qmail 8238 invoked by uid 65534); 17 Feb 2004 10:42:38 +0800
Date: 17 Feb 2004 10:42:38 +0800
Message-ID: <20040217104238.8237.qmail@eyou.com>
From: "add" <addsub@eyou.com>
To: dank@kegel.com
Reply-To: "add" <addsub@eyou.com>
Subject: Re:&nbsp;&nbsp;&nbsp;problem&nbsp;while&nbsp;building&nbsp;arm&nbsp;vfp&nbsp;softfloat&nbsp;gcc&nbsp;`
Hi, Dan, This is a patch I applied to my glibc-2.3.2, then my softfloat
toolchain can printf("%f\n",1.0). So you may have a try of this
diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h
--- glibc.old/sysdeps/arm/bits/endian.h 1999-04-12 11:59:13.000000000 -0400
+++ glibc.new/sysdeps/arm/bits/endian.h 2004-02-12 09:15:13.000000000 -0500
@@ -9,4 +9,9 @@
#else
#define __BYTE_ORDER __LITTLE_ENDIAN
#endif
+
+#ifdef __VFP_FP__
+#define __FLOAT_WORD_ORDER __BYTE_ORDER
+#else
#define __FLOAT_WORD_ORDER __BIG_ENDIAN
+#endif
diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h
--- glibc.old/sysdeps/arm/gmp-mparam.h 2001-07-07 15:21:19.000000000 -0400
+++ glibc.new/sysdeps/arm/gmp-mparam.h 2004-02-12 09:15:13.000000000 -0500
@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
#define BITS_PER_SHORTINT 16
#define BITS_PER_CHAR 8
-#define IEEE_DOUBLE_BIG_ENDIAN 0
-#define IEEE_DOUBLE_MIXED_ENDIAN 1
+#if defined(__ARMEB__)
+# define IEEE_DOUBLE_MIXED_ENDIAN 0
+# define IEEE_DOUBLE_BIG_ENDIAN 1
+#elif defined(__VFP_FP__)
+# define IEEE_DOUBLE_MIXED_ENDIAN 0
+# define IEEE_DOUBLE_BIG_ENDIAN 0
+#else
+# define IEEE_DOUBLE_BIG_ENDIAN 0
+# define IEEE_DOUBLE_MIXED_ENDIAN 1
+#endif
diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h
--- glibc.old/sysdeps/arm/ieee754.h 2001-07-07 15:21:19.000000000 -0400
+++ glibc.new/sysdeps/arm/ieee754.h 1969-12-31 19:00:00.000000000 -0500
@@ -1,115 +0,0 @@
-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _IEEE754_H
-
-#define _IEEE754_H 1
-#include <features.h>
-
-#include <endian.h>
-
-__BEGIN_DECLS
-
-union ieee754_float
- {
- float f;
-
- /* This is the IEEE 754 single-precision format. */
- struct
- {
- unsigned int mantissa:23;
- unsigned int exponent:8;
- unsigned int negative:1;
- } ieee;
-
- /* This format makes it easier to see if a NaN is a signalling NaN. */
- struct
- {
- unsigned int mantissa:22;
- unsigned int quiet_nan:1;
- unsigned int exponent:8;
- unsigned int negative:1;
- } ieee_nan;
- };
-
-#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
-
-
-union ieee754_double
- {
- double d;
-
- /* This is the IEEE 754 double-precision format. */
- struct
- {
- unsigned int mantissa0:20;
- unsigned int exponent:11;
- unsigned int negative:1;
- unsigned int mantissa1:32;
- } ieee;
-
- /* This format makes it easier to see if a NaN is a signalling NaN. */
- struct
- {
- unsigned int mantissa0:19;
- unsigned int quiet_nan:1;
- unsigned int exponent:11;
- unsigned int negative:1;
- unsigned int mantissa1:32;
- } ieee_nan;
- };
-
-#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
-
-
-/* The following two structures are correct for `new' floating point systems but
- wrong for the old FPPC. The only solution seems to be to avoid their use on
- old hardware. */
-
-union ieee854_long_double
- {
- long double d;
-
- /* This is the IEEE 854 double-extended-precision format. */
- struct
- {
- unsigned int exponent:15;
- unsigned int empty:16;
- unsigned int negative:1;
- unsigned int mantissa1:32;
- unsigned int mantissa0:32;
- } ieee;
-
- /* This is for NaNs in the IEEE 854 double-extended-precision format. */
- struct
- {
- unsigned int exponent:15;
- unsigned int empty:16;
- unsigned int negative:1;
- unsigned int mantissa1:32;
- unsigned int mantissa0:30;
- unsigned int quiet_nan:1;
- unsigned int one:1;
- } ieee_nan;
- };
-
-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
-
-__END_DECLS
-
-#endif /* ieee754.h */

View File

@@ -1,37 +0,0 @@
--- elf/ldconfig.c 2003-07-08 23:26:27.000000000 +0900
+++ elf/ldconfig.c.debian 2003-07-08 23:29:43.000000000 +0900
@@ -920,26 +920,24 @@
{
FILE *file = NULL;
char *line = NULL;
- const char *canon;
+ const char *canon = filename;
size_t len = 0;
+ int file_fd;
if (opt_chroot)
{
canon = chroot_canon (opt_chroot, filename);
- if (canon)
- file = fopen (canon, "r");
- else
+ if (!canon)
canon = filename;
}
- else
- {
- canon = filename;
- file = fopen (filename, "r");
- }
+
+ if ((file_fd = open(canon, O_RDONLY | O_EXCL, 0022)) != -1)
+ file = fdopen (file_fd, "r");
if (file == NULL)
{
- error (0, errno, _("Can't open configuration file %s"), canon);
+ if (opt_verbose)
+ error (0, errno, _("Can't open configuration file %s"), canon);
if (canon != filename)
free ((char *) canon);
return;

View File

@@ -1,38 +0,0 @@
--- elf/ldd.bash.in~ Tue Apr 3 21:43:31 2001
+++ elf/ldd.bash.in Tue Apr 3 21:54:15 2001
@@ -32,6 +32,7 @@
warn=
bind_now=
verbose=
+filename_magic_regex="((^|/)lib|.so$)"
while test $# -gt 0; do
case "$1" in
@@ -123,8 +124,11 @@
echo "ldd: ${file}:" $"No such file or directory" >&2
result=1
elif test -r "$file"; then
- test -x "$file" || echo 'ldd:' $"\
-warning: you do not have execution permission for" "\`$file'" >&2
+ if test ! -x "$file" && eval echo "$file" \
+ | egrep -v "$filename_magic_regex" > /dev/null; then
+ echo 'ldd:' $"warning: you do not have execution permission for"\
+ "\`$file'" >&2
+ fi
RTLD=
for rtld in ${RTLDLIST}; do
if test -x $rtld; then
@@ -143,7 +147,12 @@
fi
case $ret in
0)
- eval $add_env '"$file"' || result=1
+ if [ ! -x "$file" ] && eval file -L "$file" 2>/dev/null \
+ | sed 10q | egrep "$file_magic_regex" > /dev/null; then
+ eval $add_env ${RTLD} '"$file"' || result=1
+ else
+ eval $add_env '"$file"' || result=1
+ fi
;;
1)
# This can be a non-ELF binary or no binary at all.

View File

@@ -1,18 +0,0 @@
This patch moves ld.so.cache from /etc to /var/run. This is for devices
where /etc is JFFS2 or CRAMFS but /var is a ramdisk.
#
# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
#
--- libc/sysdeps/generic/dl-cache.h~ldsocache-varrun
+++ libc/sysdeps/generic/dl-cache.h
@@ -29,7 +29,7 @@
#endif
#ifndef LD_SO_CACHE
-# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache"
+# define LD_SO_CACHE "/var/run/ld.so.cache"
#endif
#ifndef add_system_dir

View File

@@ -1,15 +0,0 @@
--- Makeconfig~ 2001/09/12 18:49:45 1.265
+++ Makeconfig 2001/10/07 20:56:17
@@ -532,10 +532,11 @@
$(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
$(filter -Wl$(comma)-rpath-link=%,\
$(sysdep-LDFLAGS)))))
+ld_envlib_path = $(shell test x$$LD_LIBRARY_PATH = x || echo -n :$$LD_LIBRARY_PATH)
run-program-prefix = $(if $(filter $(notdir $(built-program-file)),\
$(tests-static)),, \
$(elf-objpfx)$(rtld-installed-name) \
- --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)))
+ --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path))$(ld_envlib_path))
else
run-program-prefix =
endif

View File

@@ -1,22 +0,0 @@
--- sysdeps/unix/sysv/linux/mips/bits/socket.h.orig 2004-09-15 14:27:06.342572280 +0200
+++ sysdeps/unix/sysv/linux/mips/bits/socket.h 2004-09-15 14:27:28.162255184 +0200
@@ -261,7 +261,7 @@
# define _EXTERN_INLINE extern __inline
# endif
_EXTERN_INLINE struct cmsghdr *
-__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
+__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)
{
if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
/* The kernel header does this so there may be a reason. */
--- sysdeps/unix/sysv/linux/mips/sys/tas.h.orig 2004-09-15 14:27:41.809180536 +0200
+++ sysdeps/unix/sysv/linux/mips/sys/tas.h 2004-09-15 14:27:53.245441960 +0200
@@ -35,7 +35,7 @@
# endif
_EXTERN_INLINE int
-_test_and_set (int *p, int v) __THROW
+_test_and_set (int *p, int v)
{
int r, t;

View File

@@ -1,52 +0,0 @@
--- glibc-2.3.2/manual/Makefile~noinfo
+++ glibc-2.3.2/manual/Makefile
@@ -25,7 +25,7 @@
INSTALL_INFO = install-info
.PHONY: all dvi pdf info html
-all: dvi
+all:
dvi: libc.dvi
pdf: libc.pdf
@@ -41,7 +41,7 @@
TEXI2PDF = texi2dvi --pdf
ifneq ($(strip $(MAKEINFO)),:)
-all: info
+all:
info: libc.info dir-add.info
endif
@@ -176,28 +176,14 @@
-rm -f top-menu.texi chapters.texi
.PHONY: install subdir_install installdirs install-data
-install-data subdir_install: install
+install-data subdir_install:
ifneq ($(strip $(MAKEINFO)),:)
# There are two variants of install-info out there. The GNU version
# knows about the INFO-DIR-SECTION tag, the Debian version doesn't.
ifneq ($(OLD_DEBIAN_INSTALL_INFO),yes)
-install: $(inst_infodir)/libc.info dir-add.info
- @if $(SHELL) -c '$(INSTALL_INFO) --version' >/dev/null 2>&1; then \
- test -f $(inst_infodir)/dir || $(INSTALL_DATA) dir $(inst_infodir);\
- $(INSTALL_INFO) --info-dir=$(inst_infodir) $(inst_infodir)/libc.info;\
- $(INSTALL_INFO) --info-dir=$(inst_infodir) dir-add.info;\
- else : ; fi
+install:
else
-install: $(inst_infodir)/libc.info dir-add.info
- @if $(SHELL) -c '$(INSTALL_INFO) --version' >/dev/null 2>&1; then \
- test -f $(inst_infodir)/dir || $(INSTALL_DATA) dir $(inst_infodir);\
- $(INSTALL_INFO) --info-dir=$(inst_infodir) \
- --section '^GNU Libraries:' 'GNU Libraries:' \
- $(inst_infodir)/libc.info;\
- $(INSTALL_INFO) --info-dir=$(inst_infodir) \
- --section '^GNU C Library functions:' 'GNU C Library functions:' \
- dir-add.info;\
- else : ; fi
+install:
endif
endif
# Catchall implicit rule for other installation targets from the parent.

View File

@@ -1,560 +0,0 @@
From 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
Return-Path: <libc-alpha-return-16890-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
Delivered-To: listarch-libc-alpha at sources dot redhat dot com
Received: (qmail 26073 invoked by alias); 19 Jan 2005 18:02:41 -0000
Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
Precedence: bulk
List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
List-Post: <mailto:libc-alpha at sources dot redhat dot com>
List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
Sender: libc-alpha-owner at sources dot redhat dot com
Delivered-To: mailing list libc-alpha at sources dot redhat dot com
Received: (qmail 25420 invoked from network); 19 Jan 2005 18:01:47 -0000
Received: from unknown (HELO mail.codesourcery.com) (65.74.133.9)
by sourceware dot org with SMTP; 19 Jan 2005 18:01:47 -0000
Received: (qmail 7456 invoked from network); 19 Jan 2005 18:01:44 -0000
Received: from localhost (HELO ?192.168.0.100?) (mitchell@127.0.0.1)
by mail dot codesourcery dot com with SMTP; 19 Jan 2005 18:01:44 -0000
Message-ID: <41EEA082.1020000@codesourcery.com>
Date: Wed, 19 Jan 2005 10:01:38 -0800
From: Mark Mitchell <mark at codesourcery dot com>
Organization: CodeSourcery, LLC
User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103)
MIME-Version: 1.0
To: Daniel Jacobowitz <drow at false dot org>
CC: libc-alpha at sources dot redhat dot com
Subject: Re: PATCH: ARM dl-trampoline.S
References: <200501191631.j0JGVVRA002591@sirius.codesourcery.com> <20050119170217.GA3137@nevyn.them.org>
In-Reply-To: <20050119170217 dot GA3137 at nevyn dot them dot org>
Content-Type: multipart/mixed;
boundary="------------050601050507020101060100"
This is a multi-part message in MIME format.
--------------050601050507020101060100
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Daniel Jacobowitz wrote:
> On Wed, Jan 19, 2005 at 08:31:31AM -0800, Mark Mitchell wrote:
>
>>This patch updates the ARM port for the recent dl-trampoline.S and
>>link.h changes. OK to apply?
>
>
> Did you test this? I'm pretty sure that RESOLVE_MAP returns a link
> map, unlike RESOLVE.
No, I didn't test -- except by building glibc. (There are other
problems at the moment, AFAICT, with actually running the library on ARM.)
However, you're definitely correct -- good catch! -- and, in fact, in
looking at my logs I see compiler warnings about the mismatched type
assignment. Here is a more plausible version. How about this one?
Thanks,
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304
--------------050601050507020101060100
Content-Type: text/plain;
name="glibc.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="glibc.patch"
2005-01-19 Mark Mitchell <mark@codesourcery.com>
* elf/tst-auditmod1.c: Add ARM support.
* sysdeps/arm/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE):
Remove.
(RESOLVE): Do not use it; use ...
(RESOLVE_MAP): ... instead.
(ARCH_LA_PLTENTER): Define.
(ARCH_LA_PLTEXIT): Likewise.
(elf_machine_rel): Use RESOLVE_MAP, not RESOLVE.
(elf_machine_rela): Likewise.
* sysdeps/arm/dl-trampoline.S: New file.
* sysdeps/arm/bits/link.h: Likewise.
* sysdeps/generic/ldsodefs.h (struct La_arm_regs): Declare.
(struct audit_ifaces): Add ARM functions.
Index: elf/tst-auditmod1.c
===================================================================
RCS file: /cvs/glibc/libc/elf/tst-auditmod1.c,v
retrieving revision 1.7
diff -c -5 -p -r1.7 tst-auditmod1.c
*** elf/tst-auditmod1.c 16 Jan 2005 06:24:59 -0000 1.7
--- elf/tst-auditmod1.c 19 Jan 2005 17:54:32 -0000
*************** la_symbind64 (Elf64_Sym *sym, unsigned i
*** 100,110 ****
symname, (long int) sym->st_value, ndx, *flags);
return sym->st_value;
}
! #ifdef __i386__
# define pltenter la_i86_gnu_pltenter
# define pltexit la_i86_gnu_pltexit
# define La_regs La_i86_regs
# define La_retval La_i86_retval
# define int_retval lrv_eax
--- 100,116 ----
symname, (long int) sym->st_value, ndx, *flags);
return sym->st_value;
}
! #ifdef __arm__
! # define pltenter la_arm_gnu_plteneter
! # define pltext la_arm_gnu_pltexit
! # define La_regs La_arm_regs
! # define La_retval La_arm_retval
! # define int_retval lvr_r0
! #elif defined __i386__
# define pltenter la_i86_gnu_pltenter
# define pltexit la_i86_gnu_pltexit
# define La_regs La_i86_regs
# define La_retval La_i86_retval
# define int_retval lrv_eax
Index: sysdeps/arm/dl-trampoline.S
===================================================================
RCS file: sysdeps/arm/dl-trampoline.S
diff -N sysdeps/arm/dl-trampoline.S
*** /dev/null 1 Jan 1970 00:00:00 -0000
--- sysdeps/arm/dl-trampoline.S 19 Jan 2005 17:54:32 -0000
***************
*** 0 ****
--- 1,135 ----
+ /* PLT trampolines. ARM version.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+ #include <sysdep.h>
+
+ #if defined(__USE_BX__)
+ #define BX(x) bx x
+ #else
+ #define BX(x) mov pc, x
+ #endif
+
+ #ifndef PROF
+ .text
+ .globl _dl_runtime_resolve
+ .type _dl_runtime_resolve, #function
+ .align 2
+ _dl_runtime_resolve:
+ @ we get called with
+ @ stack[0] contains the return address from this call
+ @ ip contains &GOT[n+3] (pointer to function)
+ @ lr points to &GOT[2]
+
+ @ stack arguments
+ stmdb sp!,{r0-r3}
+
+ @ get pointer to linker struct
+ ldr r0, [lr, #-4]
+
+ @ prepare to call _dl_fixup()
+ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
+ sub r1, ip, lr
+ sub r1, r1, #4
+ add r1, r1, r1
+
+ @ call fixup routine
+ bl _dl_fixup
+
+ @ save the return
+ mov ip, r0
+
+ @ get arguments and return address back
+ ldmia sp!, {r0-r3,lr}
+
+ @ jump to the newly found address
+ BX(ip)
+
+ .size _dl_runtime_resolve, .-_dl_runtime_resolve
+
+ .globl _dl_runtime_profile
+ .type _dl_runtime_profile, #function
+ .align 2
+ _dl_runtime_profile:
+ @ stack arguments
+ stmdb sp!, {r0-r3}
+
+ @ get pointer to linker struct
+ ldr r0, [lr, #-4]
+
+ @ prepare to call _dl_profile_fixup()
+ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
+ sub r1, ip, lr
+ sub r1, r1, #4
+ add r1, r1, r1
+
+ @ call profiling fixup routine
+ bl _dl_profile_fixup
+
+ @ save the return
+ mov ip, r0
+
+ @ get arguments and return address back
+ ldmia sp!, {r0-r3,lr}
+
+ @ jump to the newly found address
+ BX(ip)
+
+ .size _dl_runtime_resolve, .-_dl_runtime_resolve
+ .previous
+ #else
+ .text
+ .globl _dl_runtime_resolve
+ .globl _dl_runtime_profile
+ .type _dl_runtime_resolve, #function
+ .type _dl_runtime_profile, #function
+ .align 2
+ _dl_runtime_resolve:
+ _dl_runtime_profile:
+ @ we get called with
+ @ stack[0] contains the return address from this call
+ @ ip contains &GOT[n+3] (pointer to function)
+ @ lr points to &GOT[2]
+
+ @ stack arguments
+ stmdb sp!, {r0-r3}
+
+ @ get pointer to linker struct
+ ldr r0, [lr, #-4]
+
+ @ prepare to call _dl_fixup()
+ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
+ sub r1, ip, lr
+ sub r1, r1, #4
+ add r1, r1, r1
+
+ @ call profiling fixup routine
+ bl _dl_fixup
+
+ @ save the return
+ mov ip, r0
+
+ @ get arguments and return address back
+ ldmia sp!, {r0-r3,lr}
+
+ @ jump to the newly found address
+ BX(ip)
+
+ .size _dl_runtime_profile, .-_dl_runtime_profile
+ .previous
+ #endif
Index: sysdeps/arm/bits/link.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/arm/bits/link.h,v
retrieving revision 1.2
diff -c -5 -p -r1.2 link.h
*** sysdeps/arm/bits/link.h 6 Jan 2005 22:40:20 -0000 1.2
--- sysdeps/arm/bits/link.h 19 Jan 2005 17:54:32 -0000
***************
*** 0 ****
--- 1,57 ----
+ /* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+ #ifndef _LINK_H
+ # error "Never include <bits/link.h> directly; use <link.h> instead."
+ #endif
+
+
+ /* Registers for entry into PLT on ARM. */
+ typedef struct La_arm_regs
+ {
+ uint32_t lvr_r0;
+ uint32_t lvr_r1;
+ uint32_t lvr_r2;
+ uint32_t lvr_r3;
+ } La_arm_regs;
+
+ /* Return values for calls from PLT on ARM. */
+ typedef struct La_arm_retval
+ {
+ uint32_t lvr_r0;
+ uint32_t lvr_r1;
+ } La_arm_retval;
+
+
+ __BEGIN_DECLS
+
+ extern Elf32_Addr la_arm_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ La_arm_regs *__regs,
+ unsigned int *__flags,
+ const char *__symname,
+ long int *__framesizep);
+ extern unsigned int la_arm_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ const La_arm_regs *__inregs,
+ La_arm_retval *__outregs,
+ const char *symname);
+
+ __END_DECLS
Index: sysdeps/generic/ldsodefs.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/generic/ldsodefs.h,v
retrieving revision 1.112
diff -c -5 -p -r1.112 ldsodefs.h
*** sysdeps/generic/ldsodefs.h 16 Jan 2005 02:07:29 -0000 1.112
--- sysdeps/generic/ldsodefs.h 19 Jan 2005 17:54:32 -0000
*************** enum allowmask
*** 173,182 ****
--- 173,183 ----
allow_ldso = 8
};
/* Type for list of auditing interfaces. */
+ struct La_arm_regs;
struct La_i86_regs;
struct La_i86_retval;
struct La_x86_64_regs;
struct La_x86_64_retval;
struct La_ppc32_regs;
*************** struct audit_ifaces
*** 202,211 ****
--- 203,216 ----
uintptr_t (*symbind64) (Elf64_Sym *, unsigned int, uintptr_t *,
uintptr_t *, unsigned int *, const char *);
};
union
{
+ Elf32_Addr (*arm_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *,
+ uintptr_t *, struct La_arm_regs *,
+ unsigned int *, const char *name,
+ long int *framesizep);
Elf32_Addr (*i86_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *,
uintptr_t *, struct La_i86_regs *,
unsigned int *, const char *name,
long int *framesizep);
Elf64_Addr (*x86_64_gnu_pltenter) (Elf64_Sym *, unsigned int, uintptr_t *,
*************** struct audit_ifaces
*** 229,238 ****
--- 234,246 ----
unsigned int *, const char *name,
long int *framesizep);
};
union
{
+ unsigned int (*arm_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *,
+ uintptr_t *, const struct La_arm_regs *,
+ struct La_i86_retval *, const char *);
unsigned int (*i86_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *,
uintptr_t *, const struct La_i86_regs *,
struct La_i86_retval *, const char *);
unsigned int (*x86_64_gnu_pltexit) (Elf64_Sym *, unsigned int, uintptr_t *,
uintptr_t *,
--------------050601050507020101060100--
diff -u -r1.52 dl-machine.h
--- sysdeps/arm/dl-machine.h 15 Mar 2005 22:57:26 -0000 1.52
+++ sysdeps/arm/dl-machine.h 22 Apr 2005 03:38:15 -0000
@@ -129,119 +129,6 @@
#define BX(x) "mov\tpc, " #x
#endif
-#ifndef PROF
-# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
- .text\n\
- .globl _dl_runtime_resolve\n\
- .type _dl_runtime_resolve, #function\n\
- .align 2\n\
-_dl_runtime_resolve:\n\
- @ we get called with\n\
- @ stack[0] contains the return address from this call\n\
- @ ip contains &GOT[n+3] (pointer to function)\n\
- @ lr points to &GOT[2]\n\
-\n\
- @ stack arguments\n\
- stmdb sp!,{r0-r3}\n\
-\n\
- @ get pointer to linker struct\n\
- ldr r0, [lr, #-4]\n\
-\n\
- @ prepare to call fixup()\n\
- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
- sub r1, ip, lr\n\
- sub r1, r1, #4\n\
- add r1, r1, r1\n\
-\n\
- @ call fixup routine\n\
- bl fixup\n\
-\n\
- @ save the return\n\
- mov ip, r0\n\
-\n\
- @ get arguments and return address back\n\
- ldmia sp!, {r0-r3,lr}\n\
-\n\
- @ jump to the newly found address\n\
- " BX(ip) "\n\
-\n\
- .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
-\n\
- .globl _dl_runtime_profile\n\
- .type _dl_runtime_profile, #function\n\
- .align 2\n\
-_dl_runtime_profile:\n\
- @ stack arguments\n\
- stmdb sp!, {r0-r3}\n\
-\n\
- @ get pointer to linker struct\n\
- ldr r0, [lr, #-4]\n\
-\n\
- @ prepare to call fixup()\n\
- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
- sub r1, ip, lr\n\
- sub r1, r1, #4\n\
- add r1, r1, r1\n\
-\n\
- @ call profiling fixup routine\n\
- bl profile_fixup\n\
-\n\
- @ save the return\n\
- mov ip, r0\n\
-\n\
- @ get arguments and return address back\n\
- ldmia sp!, {r0-r3,lr}\n\
-\n\
- @ jump to the newly found address\n\
- " BX(ip) "\n\
-\n\
- .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
- .previous\n\
-");
-#else // PROF
-# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
- .text\n\
- .globl _dl_runtime_resolve\n\
- .globl _dl_runtime_profile\n\
- .type _dl_runtime_resolve, #function\n\
- .type _dl_runtime_profile, #function\n\
- .align 2\n\
-_dl_runtime_resolve:\n\
-_dl_runtime_profile:\n\
- @ we get called with\n\
- @ stack[0] contains the return address from this call\n\
- @ ip contains &GOT[n+3] (pointer to function)\n\
- @ lr points to &GOT[2]\n\
-\n\
- @ stack arguments\n\
- stmdb sp!, {r0-r3}\n\
-\n\
- @ get pointer to linker struct\n\
- ldr r0, [lr, #-4]\n\
-\n\
- @ prepare to call fixup()\n\
- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
- sub r1, ip, lr\n\
- sub r1, r1, #4\n\
- add r1, r1, r1\n\
-\n\
- @ call profiling fixup routine\n\
- bl fixup\n\
-\n\
- @ save the return\n\
- mov ip, r0\n\
-\n\
- @ get arguments and return address back\n\
- ldmia sp!, {r0-r3,lr}\n\
-\n\
- @ jump to the newly found address\n\
- " BX(ip) "\n\
-\n\
- .size _dl_runtime_profile, .-_dl_runtime_profile\n\
- .previous\n\
-");
-#endif //PROF
-
/* Mask identifying addresses reserved for the user program,
where the dynamic linker should not map anything. */
#define ELF_MACHINE_USER_ADDRESS_MASK 0xf8000000UL
@@ -348,6 +235,10 @@
return value;
}
+/* Names of the architecture-specific auditing callback functions. */
+#define ARCH_LA_PLTENTER arm_gnu_pltenter
+#define ARCH_LA_PLTEXIT arm_gnu_pltexit
+
#endif /* !dl_machine_h */
@@ -355,7 +246,7 @@
Prelinked libraries may use Elf32_Rela though. */
#define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP
-#ifdef RESOLVE
+#ifdef RESOLVE_MAP
/* Deal with an out-of-range PC24 reloc. */
static Elf32_Addr
@@ -425,7 +316,8 @@
#endif
{
const Elf32_Sym *const refsym = sym;
- Elf32_Addr value = RESOLVE (&sym, version, r_type);
+ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
+ Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value;
if (sym)
value += sym->st_value;
@@ -535,7 +427,8 @@
# ifndef RESOLVE_CONFLICT_FIND_MAP
const Elf32_Sym *const refsym = sym;
# endif
- Elf32_Addr value = RESOLVE (&sym, version, r_type);
+ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
+ Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value;
if (sym)
value += sym->st_value;
@@ -637,4 +530,4 @@
_dl_reloc_bad_type (map, r_type, 1);
}
-#endif /* RESOLVE */
+#endif /* RESOLVE_MAP */