summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2009-11-11 01:44:15 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2009-11-11 01:44:15 +0000
commit77fbb4f297a9808e9fd2e73db18abbd7e00fc639 (patch)
treecb68c849518da6ce901bc6e0114bd35c39175d71
parent85437c7924a18e38c94912459fde243ff9a30923 (diff)
Merge changes between r9190 and r9222 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@9223 7b3dc134-2b1b-0410-93df-9e9f96275f8d
-rw-r--r--libc/ChangeLog51
-rw-r--r--libc/elf/dl-sym.c9
-rw-r--r--libc/elf/ifuncmain3.c9
-rw-r--r--libc/malloc/memusagestat.c2
-rw-r--r--libc/misc/sys/uio.h4
-rw-r--r--libc/resolv/mapv4v6hostent.h12
-rw-r--r--libc/resolv/nss_dns/dns-host.c6
-rw-r--r--libc/string/bits/string3.h5
-rw-r--r--libc/sysdeps/powerpc/fpu/e_sqrt.c6
-rw-r--r--libc/sysdeps/powerpc/fpu/e_sqrtf.c6
-rw-r--r--libc/sysdeps/powerpc/powerpc64/dl-machine.h6
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h4
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h4
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h4
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list3
-rw-r--r--libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h4
-rw-r--r--libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h4
-rw-r--r--libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h4
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h4
-rw-r--r--ports/ChangeLog.alpha6
-rw-r--r--ports/ChangeLog.arm12
-rw-r--r--ports/ChangeLog.m68k5
-rw-r--r--ports/ChangeLog.mips5
-rw-r--r--ports/sysdeps/arm/memcpy.S7
-rw-r--r--ports/sysdeps/arm/memmove.S7
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c8
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h4
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/clone.S8
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/sysdep.h9
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h4
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h4
31 files changed, 176 insertions, 50 deletions
diff --git a/libc/ChangeLog b/libc/ChangeLog
index e6efe933c..49c2e08a4 100644
--- a/libc/ChangeLog
+++ b/libc/ChangeLog
@@ -1,3 +1,54 @@
+2009-11-10 Andreas Schwab <schwab@redhat.com>
+
+ * resolv/mapv4v6hostent.h (map_v4v6_hostent): Return non-zero if
+ out of buffer space.
+ * resolv/nss_dns/dns-host.c (getanswer_r): Check for
+ map_v4v6_hostent running out of space.
+
+2009-11-10 Ulrich Drepper <drepper@redhat.com>
+
+ * string/bits/string3.h (memset): If the second parameter is constant
+ and zero there is likely no transposition.
+ Patch by Caolan McNamara <caolanm@redhat.com.
+
+2009-11-04 Philippe De Muyter <phdm@macqel.be>
+
+ * sysdeps/powerpc/fpu/e_sqrt.c: Fix spelling of (Newton-)Raphson.
+ * sysdeps/powerpc/fpu/e_sqrtf.c: Likewise.
+
+2009-10-30 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ * malloc/memusagestat.c (main): Fix spelling in an error message.
+
+2009-11-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf/dl-sym.c (do_sym): Properly handle STT_GNU_IFUNC symbols.
+ * elf/ifuncmain3.c (main): Test dlopen STT_GNU_IFUNC symbol.
+
+2009-11-03 Andreas Schwab <schwab@redhat.com>
+
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list: Add
+ readahead.
+
+2009-11-03 Jakub Jelinek <jakub@redhat.com>
+
+ * sysdeps/powerpc/powerpc64/dl-machine.h (resolve_ifunc): Don't
+ relocate opd entry when resolving prelink conflicts.
+
+2009-11-04 Jakub Jelinek <jakub@redhat.com>
+
+ * misc/sys/uio.h (preadv, pwritev): Fix type of last argument
+ when -D_FILE_OFFSET_BITS=64.
+
+ * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (fallocate): Fix types
+ of last two arguments when -D_FILE_OFFSET_BITS=64.
+ * sysdeps/unix/sysv/linux/i386/bits/fcntl.h (fallocate): Likewise.
+ * sysdeps/unix/sysv/linux/s390/bits/fcntl.h (fallocate): Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h (fallocate): Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h (fallocate): Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (fallocate): Likewise.
+ * sysdeps/unix/sysv/linux/sh/bits/fcntl.h (fallocate): Likewise.
+
2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
[BZ #4457]
diff --git a/libc/elf/dl-sym.c b/libc/elf/dl-sym.c
index 459729f0f..4faf05c00 100644
--- a/libc/elf/dl-sym.c
+++ b/libc/elf/dl-sym.c
@@ -193,8 +193,13 @@ RTLD_NEXT used in code not dynamically loaded"));
/* Resolve indirect function address. */
if (__builtin_expect (ELFW(ST_TYPE) (ref->st_info) == STT_GNU_IFUNC, 0))
- value
- = ((DL_FIXUP_VALUE_TYPE (*) (void)) DL_FIXUP_VALUE_ADDR (value)) ();
+ {
+ DL_FIXUP_VALUE_TYPE fixup
+ = DL_FIXUP_MAKE_VALUE (result, (ElfW(Addr)) value);
+ fixup =
+ ((DL_FIXUP_VALUE_TYPE (*) (void)) DL_FIXUP_VALUE_ADDR (fixup)) ();
+ value = (void *) DL_FIXUP_VALUE_CODE_ADDR (fixup);
+ }
#ifdef SHARED
/* Auditing checkpoint: we have a new binding. Provide the
diff --git a/libc/elf/ifuncmain3.c b/libc/elf/ifuncmain3.c
index 5d067cced..1574dd5cb 100644
--- a/libc/elf/ifuncmain3.c
+++ b/libc/elf/ifuncmain3.c
@@ -46,6 +46,15 @@ main (void)
return 1;
}
+ p = dlsym (h, "foo");
+ if (p == NULL)
+ {
+ printf ("symbol not found: %s\n", dlerror ());
+ return 1;
+ }
+ if ((*p) () != -1)
+ abort ();
+
f = dlsym (h, "get_foo_p");
if (f == NULL)
{
diff --git a/libc/malloc/memusagestat.c b/libc/malloc/memusagestat.c
index cbf5c3805..c1e55f7da 100644
--- a/libc/malloc/memusagestat.c
+++ b/libc/malloc/memusagestat.c
@@ -181,7 +181,7 @@ main (int argc, char *argv[])
|| st.st_size < 2 * sizeof (struct entry))
{
close (fd);
- error (EXIT_FAILURE, 0, "input file as incorrect size");
+ error (EXIT_FAILURE, 0, "input file has incorrect size");
}
/* Compute number of data entries. */
total = st.st_size / sizeof (struct entry) - 2;
diff --git a/libc/misc/sys/uio.h b/libc/misc/sys/uio.h
index 05d956bfd..a32b7ed8e 100644
--- a/libc/misc/sys/uio.h
+++ b/libc/misc/sys/uio.h
@@ -80,10 +80,10 @@ extern ssize_t pwritev (int __fd, __const struct iovec *__iovec, int __count,
# else
# ifdef __REDIRECT
extern ssize_t __REDIRECT (preadv, (int __fd, __const struct iovec *__iovec,
- int __count, __off_t __offset),
+ int __count, __off64_t __offset),
preadv64) __wur;
extern ssize_t __REDIRECT (pwritev, (int __fd, __const struct iovec *__iovec,
- int __count, __off_t __offset),
+ int __count, __off64_t __offset),
pwritev64) __wur;
# else
# define preadv preadv64
diff --git a/libc/resolv/mapv4v6hostent.h b/libc/resolv/mapv4v6hostent.h
index 4151ce363..c11038adf 100644
--- a/libc/resolv/mapv4v6hostent.h
+++ b/libc/resolv/mapv4v6hostent.h
@@ -57,13 +57,13 @@ typedef union {
char ac;
} align;
-static void
+static int
map_v4v6_hostent (struct hostent *hp, char **bpp, int *lenp)
{
char **ap;
if (hp->h_addrtype != AF_INET || hp->h_length != INADDRSZ)
- return;
+ return 0;
hp->h_addrtype = AF_INET6;
hp->h_length = IN6ADDRSZ;
for (ap = hp->h_addr_list; *ap; ap++)
@@ -71,11 +71,8 @@ map_v4v6_hostent (struct hostent *hp, char **bpp, int *lenp)
int i = sizeof (align) - ((u_long) *bpp % sizeof (align));
if (*lenp < (i + IN6ADDRSZ))
- {
- /* Out of memory. Truncate address list here. XXX */
- *ap = NULL;
- return;
- }
+ /* Out of memory. */
+ return 1;
*bpp += i;
*lenp -= i;
map_v4v6_address (*ap, *bpp);
@@ -83,4 +80,5 @@ map_v4v6_hostent (struct hostent *hp, char **bpp, int *lenp)
*bpp += IN6ADDRSZ;
*lenp -= IN6ADDRSZ;
}
+ return 0;
}
diff --git a/libc/resolv/nss_dns/dns-host.c b/libc/resolv/nss_dns/dns-host.c
index 62e67e8b0..818a40a89 100644
--- a/libc/resolv/nss_dns/dns-host.c
+++ b/libc/resolv/nss_dns/dns-host.c
@@ -878,7 +878,8 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype,
}
bp += n;
linebuflen -= n;
- map_v4v6_hostent (result, &bp, &linebuflen);
+ if (map_v4v6_hostent (result, &bp, &linebuflen))
+ goto too_small;
}
*h_errnop = NETDB_SUCCESS;
return NSS_STATUS_SUCCESS;
@@ -953,7 +954,8 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype,
}
if (have_to_map)
- map_v4v6_hostent (result, &bp, &linebuflen);
+ if (map_v4v6_hostent (result, &bp, &linebuflen))
+ goto too_small;
*h_errnop = NETDB_SUCCESS;
return NSS_STATUS_SUCCESS;
}
diff --git a/libc/string/bits/string3.h b/libc/string/bits/string3.h
index a5593e3b8..1d759f181 100644
--- a/libc/string/bits/string3.h
+++ b/libc/string/bits/string3.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005, 2007, 2009 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
@@ -77,7 +77,8 @@ __NTH (mempcpy (void *__restrict __dest, __const void *__restrict __src,
__extern_always_inline void *
__NTH (memset (void *__dest, int __ch, size_t __len))
{
- if (__builtin_constant_p (__len) && __len == 0)
+ if (__builtin_constant_p (__len) && __len == 0
+ && (!__builtin_constant_p (__ch) || __ch != 0))
{
__warn_memset_zero_len ();
return __dest;
diff --git a/libc/sysdeps/powerpc/fpu/e_sqrt.c b/libc/sysdeps/powerpc/fpu/e_sqrt.c
index 24e0dd352..e95b786a0 100644
--- a/libc/sysdeps/powerpc/fpu/e_sqrt.c
+++ b/libc/sysdeps/powerpc/fpu/e_sqrt.c
@@ -35,7 +35,7 @@ extern const float __t_sqrt[1024];
/* The method is based on a description in
Computation of elementary functions on the IBM RISC System/6000 processor,
P. W. Markstein, IBM J. Res. Develop, 34(1) 1990.
- Basically, it consists of two interleaved Newton-Rhapson approximations,
+ Basically, it consists of two interleaved Newton-Raphson approximations,
one to find the actual square root, and one to find its reciprocal
without the expense of a division operation. The tricky bit here
is the use of the POWER/PowerPC multiply-add operation to get the
@@ -44,7 +44,7 @@ extern const float __t_sqrt[1024];
The argument reduction works by a combination of table lookup to
obtain the initial guesses, and some careful modification of the
generated guesses (which mostly runs on the integer unit, while the
- Newton-Rhapson is running on the FPU). */
+ Newton-Raphson is running on the FPU). */
#ifdef __STDC__
double
@@ -102,7 +102,7 @@ __slow_ieee754_sqrt (x)
/* complete the INSERT_WORDS (sx, sxi, xi1) operation. */
sx = iw_u.value;
- /* Here we have three Newton-Rhapson iterations each of a
+ /* Here we have three Newton-Raphson iterations each of a
division and a square root and the remainder of the
argument reduction, all interleaved. */
sd = -(sg * sg - sx);
diff --git a/libc/sysdeps/powerpc/fpu/e_sqrtf.c b/libc/sysdeps/powerpc/fpu/e_sqrtf.c
index 8e8138a17..ca44fac55 100644
--- a/libc/sysdeps/powerpc/fpu/e_sqrtf.c
+++ b/libc/sysdeps/powerpc/fpu/e_sqrtf.c
@@ -35,7 +35,7 @@ extern const float __t_sqrt[1024];
/* The method is based on a description in
Computation of elementary functions on the IBM RISC System/6000 processor,
P. W. Markstein, IBM J. Res. Develop, 34(1) 1990.
- Basically, it consists of two interleaved Newton-Rhapson approximations,
+ Basically, it consists of two interleaved Newton-Raphson approximations,
one to find the actual square root, and one to find its reciprocal
without the expense of a division operation. The tricky bit here
is the use of the POWER/PowerPC multiply-add operation to get the
@@ -44,7 +44,7 @@ extern const float __t_sqrt[1024];
The argument reduction works by a combination of table lookup to
obtain the initial guesses, and some careful modification of the
generated guesses (which mostly runs on the integer unit, while the
- Newton-Rhapson is running on the FPU). */
+ Newton-Raphson is running on the FPU). */
#ifdef __STDC__
float
@@ -90,7 +90,7 @@ __slow_ieee754_sqrtf (x)
sg = t_sqrt[0];
sy = t_sqrt[1];
- /* Here we have three Newton-Rhapson iterations each of a
+ /* Here we have three Newton-Raphson iterations each of a
division and a square root and the remainder of the
argument reduction, all interleaved. */
sd = -(sg * sg - sx);
diff --git a/libc/sysdeps/powerpc/powerpc64/dl-machine.h b/libc/sysdeps/powerpc/powerpc64/dl-machine.h
index 8a720ae9c..00888587a 100644
--- a/libc/sysdeps/powerpc/powerpc64/dl-machine.h
+++ b/libc/sysdeps/powerpc/powerpc64/dl-machine.h
@@ -531,13 +531,14 @@ auto inline Elf64_Addr __attribute__ ((always_inline))
resolve_ifunc (Elf64_Addr value,
const struct link_map *map, const struct link_map *sym_map)
{
+#ifndef RESOLVE_CONFLICT_FIND_MAP
/* The function we are calling may not yet have its opd entry relocated. */
Elf64_FuncDesc opd;
if (map != sym_map
-#if !defined RTLD_BOOTSTRAP && defined SHARED
+# if !defined RTLD_BOOTSTRAP && defined SHARED
/* Bootstrap map doesn't have l_relocated set for it. */
&& sym_map != &GL(dl_rtld_map)
-#endif
+# endif
&& !sym_map->l_relocated)
{
Elf64_FuncDesc *func = (Elf64_FuncDesc *) value;
@@ -546,6 +547,7 @@ resolve_ifunc (Elf64_Addr value,
opd.fd_aux = func->fd_aux;
value = (Elf64_Addr) &opd;
}
+#endif
return ((Elf64_Addr (*) (void)) value) ();
}
diff --git a/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h b/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
index 06b9e48ac..6a38dc03f 100644
--- a/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
+++ b/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
@@ -259,8 +259,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# else
# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
- __off_t __len),
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len),
fallocate64);
# else
# define fallocate fallocate64
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h b/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
index 967739477..9a0245a6c 100644
--- a/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
+++ b/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
@@ -253,8 +253,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# else
# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
- __off_t __len),
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len),
fallocate64);
# else
# define fallocate fallocate64
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
index ea0ee6e55..6c4b66b7a 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
@@ -259,8 +259,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# else
# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
- __off_t __len),
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len),
fallocate64);
# else
# define fallocate fallocate64
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list
index 82025b485..1233be671 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list
@@ -3,3 +3,6 @@
# System calls with wrappers.
oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0
oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0
+
+# Due to 64bit alignment there is a dummy second parameter
+readahead - readahead i:iiiii __readahead readahead
diff --git a/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h b/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
index 3a11c48e0..d3dddbc36 100644
--- a/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
+++ b/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
@@ -279,8 +279,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# else
# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
- __off_t __len),
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len),
fallocate64);
# else
# define fallocate fallocate64
diff --git a/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h b/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
index 03ecd72fe..d7a21ea2e 100644
--- a/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
+++ b/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
@@ -259,8 +259,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# else
# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
- __off_t __len),
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len),
fallocate64);
# else
# define fallocate fallocate64
diff --git a/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h b/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
index 2b8c9bd10..dfa848a37 100644
--- a/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
+++ b/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
@@ -278,8 +278,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# else
# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
- __off_t __len),
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len),
fallocate64);
# else
# define fallocate fallocate64
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h b/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
index 29c956cdf..c3eb859e7 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
+++ b/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
@@ -273,8 +273,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# else
# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
- __off_t __len),
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len),
fallocate64);
# else
# define fallocate fallocate64
diff --git a/ports/ChangeLog.alpha b/ports/ChangeLog.alpha
index eb23873a9..5a9b442ee 100644
--- a/ports/ChangeLog.alpha
+++ b/ports/ChangeLog.alpha
@@ -1,3 +1,9 @@
+2009-11-10 Matt Turner <mattst88@gmail.com>
+
+ [BZ #10609]
+ * sysdeps/unix/sysv/linux/alpha/fxstatat.c (__fxstatat): Fix handling
+ of empty parameters for file names.
+
2009-07-13 Aurelien Jarno <aurelien@aurel32.net>
[BZ #10158]
diff --git a/ports/ChangeLog.arm b/ports/ChangeLog.arm
index 16380331e..58bfada3c 100644
--- a/ports/ChangeLog.arm
+++ b/ports/ChangeLog.arm
@@ -1,3 +1,15 @@
+2009-11-06 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (fallocate): Fix types
+ of last two arguments when -D_FILE_OFFSET_BITS=64.
+
+2009-11-04 Philip Blundell <philb@gnu.org>
+
+ * sysdeps/unix/sysv/linux/arm/clone.S: Support V4T interworking.
+ * sysdeps/unix/sysv/linux/arm/sysdep.h (__local_syscall_error): Likewise.
+ * sysdeps/arm/memcpy.S: Likewise.
+ * sysdeps/arm/memmove.S: Likewise.
+
2009-10-29 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define F_OWNER_* and
diff --git a/ports/ChangeLog.m68k b/ports/ChangeLog.m68k
index 59be68cc0..6d8c26f03 100644
--- a/ports/ChangeLog.m68k
+++ b/ports/ChangeLog.m68k
@@ -1,3 +1,8 @@
+2009-11-07 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (fallocate): Fix types
+ of last two arguments when -D_FILE_OFFSET_BITS=64.
+
2009-10-30 Joseph Myers <joseph@codesourcery.com>
[BZ #10609]
diff --git a/ports/ChangeLog.mips b/ports/ChangeLog.mips
index d4afc96c8..e7a051811 100644
--- a/ports/ChangeLog.mips
+++ b/ports/ChangeLog.mips
@@ -1,3 +1,8 @@
+2009-11-06 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (fallocate): Fix types
+ of last two arguments when -D_FILE_OFFSET_BITS=64.
+
2009-10-29 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define F_OWNER_* and
diff --git a/ports/sysdeps/arm/memcpy.S b/ports/sysdeps/arm/memcpy.S
index 61cf33cbf..7f669a6e9 100644
--- a/ports/sysdeps/arm/memcpy.S
+++ b/ports/sysdeps/arm/memcpy.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2006, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by MontaVista Software, Inc. (written by Nicolas Pitre)
@@ -130,7 +130,12 @@ ENTRY(memcpy)
strcsb r4, [r0], #1
strcsb ip, [r0]
+#if defined (__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
+ ldmfd sp!, {r0, r4, lr}
+ bx lr
+#else
ldmfd sp!, {r0, r4, pc}
+#endif
9: rsb ip, ip, #4
cmp ip, #2
diff --git a/ports/sysdeps/arm/memmove.S b/ports/sysdeps/arm/memmove.S
index eda1bcc9b..9c9b2344d 100644
--- a/ports/sysdeps/arm/memmove.S
+++ b/ports/sysdeps/arm/memmove.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by MontaVista Software, Inc. (written by Nicolas Pitre)
@@ -144,7 +144,12 @@ ENTRY(memmove)
strneb r3, [r0, #-1]!
strcsb r4, [r0, #-1]!
strcsb ip, [r0, #-1]
+#if defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__)
+ ldmfd sp!, {r0, r4, lr}
+ bx lr
+#else
ldmfd sp!, {r0, r4, pc}
+#endif
9: cmp ip, #2
ldrgtb r3, [r1, #-1]!
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c
index 497694619..66cf4f722 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c
+++ b/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 2009 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
@@ -46,6 +46,12 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
if (fd != AT_FDCWD && file[0] != '/')
{
size_t filelen = strlen (file);
+ if (__builtin_expect (filelen == 0, 0))
+ {
+ __set_errno (ENOENT);
+ return -1;
+ }
+
static const char procfd[] = "/proc/self/fd/%d/%s";
/* Buffer for the path name we are going to use. It consists of
- the string /proc/self/fd/
diff --git a/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index e5e70aab4..638890485 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -259,8 +259,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# else
# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
- __off_t __len),
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len),
fallocate64);
# else
# define fallocate fallocate64
diff --git a/ports/sysdeps/unix/sysv/linux/arm/clone.S b/ports/sysdeps/unix/sysv/linux/arm/clone.S
index cfd2e7ef7..1a19f5b55 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/clone.S
+++ b/ports/sysdeps/unix/sysv/linux/arm/clone.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005, 2008
+/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005, 2008, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Pat Beirne <patb@corelcomputer.com>
@@ -96,8 +96,14 @@ ENTRY(__clone)
#endif
@ pick the function arg and call address off the stack and execute
ldr r0, [sp, #4]
+#if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
+ ldr ip, [sp], #8
+ mov lr, pc
+ bx ip
+#else
mov lr, pc
ldr pc, [sp], #8
+#endif
@ and we are done, passing the return value through r0
b PLTJMP(HIDDEN_JUMPTARGET(_exit))
diff --git a/ports/sysdeps/unix/sysv/linux/arm/sysdep.h b/ports/sysdeps/unix/sysv/linux/arm/sysdep.h
index 3d7fafcb6..3911aee62 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/ports/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 93, 1995-2000, 2002, 2003, 2005, 2006
+/* Copyright (C) 1992, 93, 1995-2000, 2002, 2003, 2005, 2006, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
@@ -129,6 +129,11 @@ __local_syscall_error: \
DO_RET(lr); \
1: .word C_SYMBOL_NAME(rtld_errno) - 0b - 8;
# else
+#if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
+#define POP_PC ldr lr, [sp], #4; bx lr
+#else
+#define POP_PC ldr pc, [sp], #4
+#endif
# define SYSCALL_ERROR_HANDLER \
__local_syscall_error: \
str lr, [sp, #-4]!; \
@@ -138,7 +143,7 @@ __local_syscall_error: \
rsb r1, r1, #0; \
str r1, [r0]; \
mvn r0, #0; \
- ldr pc, [sp], #4;
+ POP_PC;
# endif
#else
# define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
index 1e396dcdb..3d9ef2e57 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
+++ b/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
@@ -239,8 +239,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# else
# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
- __off_t __len),
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len),
fallocate64);
# else
# define fallocate fallocate64
diff --git a/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index e45169652..88f752db6 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -272,8 +272,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# else
# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
- __off_t __len),
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len),
fallocate64);
# else
# define fallocate fallocate64