[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r6178 - in /trunk: libc/ libc/bits/ libc/elf/ libc/iconv/ libc/iconvdata/ libc/include/ libc/inet/netinet/ libc/localedata/ ...
- To: commits@xxxxxxxxxx
- Subject: [commits] r6178 - in /trunk: libc/ libc/bits/ libc/elf/ libc/iconv/ libc/iconvdata/ libc/include/ libc/inet/netinet/ libc/localedata/ ...
- From: joseph@xxxxxxxxxx
- Date: Thu, 15 May 2008 12:10:05 -0000
Author: joseph
Date: Thu May 15 05:10:03 2008
New Revision: 6178
Log:
Merge changes between r6154 and r6177 from /fsf/trunk.
Added:
trunk/libc/elf/tlsdeschtab.h
- copied unchanged from r6177, fsf/trunk/libc/elf/tlsdeschtab.h
trunk/libc/include/inline-hashtab.h
- copied unchanged from r6177, fsf/trunk/libc/include/inline-hashtab.h
trunk/libc/po/lt.po
- copied unchanged from r6177, fsf/trunk/libc/po/lt.po
trunk/libc/string/str-two-way.h
- copied unchanged from r6177, fsf/trunk/libc/string/str-two-way.h
trunk/libc/string/tst-endian.c
- copied unchanged from r6177, fsf/trunk/libc/string/tst-endian.c
trunk/libc/sysdeps/i386/dl-lookupcfg.h
- copied unchanged from r6177, fsf/trunk/libc/sysdeps/i386/dl-lookupcfg.h
trunk/libc/sysdeps/i386/dl-tlsdesc.S
- copied unchanged from r6177, fsf/trunk/libc/sysdeps/i386/dl-tlsdesc.S
trunk/libc/sysdeps/i386/dl-tlsdesc.h
- copied unchanged from r6177, fsf/trunk/libc/sysdeps/i386/dl-tlsdesc.h
trunk/libc/sysdeps/i386/tlsdesc.c
- copied unchanged from r6177, fsf/trunk/libc/sysdeps/i386/tlsdesc.c
trunk/libc/sysdeps/i386/tlsdesc.sym
- copied unchanged from r6177, fsf/trunk/libc/sysdeps/i386/tlsdesc.sym
trunk/libc/sysdeps/x86_64/dl-lookupcfg.h
- copied unchanged from r6177, fsf/trunk/libc/sysdeps/x86_64/dl-lookupcfg.h
trunk/libc/sysdeps/x86_64/dl-tlsdesc.S
- copied unchanged from r6177, fsf/trunk/libc/sysdeps/x86_64/dl-tlsdesc.S
trunk/libc/sysdeps/x86_64/dl-tlsdesc.h
- copied unchanged from r6177, fsf/trunk/libc/sysdeps/x86_64/dl-tlsdesc.h
trunk/libc/sysdeps/x86_64/tlsdesc.c
- copied unchanged from r6177, fsf/trunk/libc/sysdeps/x86_64/tlsdesc.c
trunk/libc/sysdeps/x86_64/tlsdesc.sym
- copied unchanged from r6177, fsf/trunk/libc/sysdeps/x86_64/tlsdesc.sym
Modified:
trunk/libc/ChangeLog
trunk/libc/NEWS
trunk/libc/bits/byteswap.h
trunk/libc/configure
trunk/libc/configure.in
trunk/libc/elf/dl-conflict.c
trunk/libc/elf/dl-reloc.c
trunk/libc/elf/dynamic-link.h
trunk/libc/elf/elf.h
trunk/libc/iconv/gconv_simple.c
trunk/libc/iconvdata/Makefile
trunk/libc/iconvdata/bug-iconv6.c
trunk/libc/iconvdata/run-iconv-test.sh
trunk/libc/inet/netinet/in.h
trunk/libc/localedata/ChangeLog
trunk/libc/localedata/locales/be_BY
trunk/libc/localedata/locales/iso14651_t1_common
trunk/libc/nss/getent.c
trunk/libc/posix/regcomp.c
trunk/libc/posix/regex_internal.c
trunk/libc/posix/tst-rfc3484-2.c
trunk/libc/posix/tst-rfc3484-3.c
trunk/libc/posix/tst-rfc3484.c
trunk/libc/string/Makefile
trunk/libc/string/endian.h
trunk/libc/string/memmem.c
trunk/libc/string/strcasestr.c
trunk/libc/string/strstr.c
trunk/libc/sysdeps/i386/Makefile
trunk/libc/sysdeps/i386/bits/byteswap.h
trunk/libc/sysdeps/i386/bits/linkmap.h
trunk/libc/sysdeps/i386/dl-machine.h
trunk/libc/sysdeps/i386/dl-tls.h
trunk/libc/sysdeps/ia64/bits/byteswap.h
trunk/libc/sysdeps/posix/getaddrinfo.c
trunk/libc/sysdeps/s390/bits/byteswap.h
trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h
trunk/libc/sysdeps/x86_64/Makefile
trunk/libc/sysdeps/x86_64/bits/byteswap.h
trunk/libc/sysdeps/x86_64/bits/linkmap.h
trunk/libc/sysdeps/x86_64/dl-machine.h
trunk/libc/sysdeps/x86_64/dl-tls.h
trunk/ports/ChangeLog.hppa
trunk/ports/sysdeps/hppa/fpu/fesetenv.c
Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Thu May 15 05:10:03 2008
@@ -1,3 +1,142 @@
+2008-05-14 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * string/Makefile (distribute): Add str-two-way.h.
+
+2008-03-29 Eric Blake <ebb9@xxxxxxx>
+
+ Rewrite string searches to O(n) rather than O(n^2).
+ * string/str-two-way.h: New file. For linear fixed-allocation
+ string searching.
+ * string/memmem.c: New implementation.
+ * string/strstr.c: New implementation.
+ * string/strcasestr.c: New implementation.
+
+2008-04-11 Paolo Bonzini <bonzini@xxxxxxx>
+
+ * posix/regcomp.c (optimize_utf8): Add a note on why we test
+ opr.ctx_type.
+ (calc_first): Initialize constraint field.
+ (duplicate_node_closure): Use it instead of special casing ANCHORS.
+ Use search_duplicated_node to avoid loops. Fix grammar.
+ (duplicate_node): Merge constraint field for all node types.
+ (calc_eclosure_iter): Look at constraint field for all node types.
+ * posix/regex_internal.c (create_cd_newstate): Don't look at
+ create_cd_newstate.
+
+2008-05-14 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #6428]
+ * configure.in: Don't use $CFLAGS when assembling, use $ASFLAGS.
+
+ [BZ #6442]
+ * string/endian.h: Add macros for fixed-size endian conversion.
+ * bits/byteswap.h: Allow inclusion from <endian.h>.
+ * sysdeps/i386/bits/byteswap.h: Likewise.
+ * sysdeps/ia64/bits/byteswap.h: Likewise.
+ * sysdeps/s390/bits/byteswap.h: Likewise.
+ * sysdeps/x86_64/bits/byteswap.h: Likewise.
+ * string/Makefile (tests): Add tst-endian.
+ * string/tst-endian.c: New file.
+
+ * iconvdata/run-iconv-test.sh: Use = instead of == in test.
+ Patch by Reuben Thomas.
+
+2008-05-14 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * iconvdata/Makefile (bug-iconv6-ENV, tst-iconv7-ENV): Define.
+
+2008-05-14 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * iconvdata/bug-iconv6.c (do_test): Use de_DE.UTF-8 locale.
+
+ [BZ #6461]
+ * iconv/gconv_simple.c (BODY for __gconv_transform_ascii_internal):
+ Add missing braces.
+ (BODY for __gconv_transform_internal_ascii): Likewise.
+
+ [BZ #6472]
+ * sysdeps/posix/getaddrinfo.c (get_scope): Loopback addresses have
+ to be treated like link-local addresses.
+ (match_prefix): Don't treat IPv4 loopback address special when
+ converting to v4 mapped addressed.
+
+ * sysdeps/posix/getaddrinfo.c (getaddrinfo): Call _res_hconf_init
+ if necessary.
+ * posix/tst-rfc3484.c: Add dummy definition of _res_hconf_init.
+ * posix/tst-rfc3484-2.c: Likewise.
+ * posix/tst-rfc3484-3.c: Likewise.
+
+ * sysdeps/posix/getaddrinfo.c: Implement handling of DCCP, UDPlite,
+ and SCTP.
+
+ * nss/getent.c (ahosts_keys_int): Handle all known socket types.
+
+ * inet/netinet/in.h (IPPIPPROTO_DCCP, IPPROTO_UDPLITE): Define.
+
+ * sysdeps/unix/sysv/linux/bits/socket.h (SOCK_DCCP): Define.
+
+2008-05-13 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * po/lt.po: New file. From Lituanian translation team.
+
+2008-01-30 Alexandre Oliva <aoliva@xxxxxxxxxx>
+
+ Introduce TLS descriptors for i386 and x86_64.
+ * include/inline-hashtab.h: New file, copied from 2005's
+ libiberty, with fix for memory leak imported afterwards by
+ Glauber de Oliveira Costa.
+ * elf/tlsdeschtab.h: New file.
+ * elf/dl-reloc.c (_dl_try_allocate_static_tls): Extract from...
+ (_dl_allocate_static_tls): ... here. Rearrange failure path.
+ (CHECK_STATIC_TLS): Move to...
+ * elf/dynamic-link.h: ... this file.
+ (TRY_STATIC_TLS): New macro.
+ * elf/dl-conflict.c (CHECK_STATIC_TLS, TRY_STATIC_TLS): Override.
+ * elf/elf.h (R_386_TLS_GOTDESC, R_386_TLS_DESC_CALL,
+ R_386_TLS_DESC): Define.
+ (R_X86_64_PC64, R_X86_GOTOFF64, R_X86_64_GOTPC32): Merge from
+ binutils.
+ (R_X86_64_GOTPC32_TLSDESC, R_X86_64_TLSDESC_CALL,
+ R_X86_64_TLSDESC): Define.
+ (R_386_NUM, R_X86_64_NUM): Adjust.
+ * sysdeps/i386/Makefile (sysdep-dl-routines, sysdep_routines,
+ sysdep-rtld-routines): Add tlsdesc and dl-tlsdesc for elf subdir.
+ (gen-as-const-headers): Add tlsdesc.sym to csu subdir.
+ * sysdeps/i386/dl-lookupcfg.h: New file. Introduce _dl_unmap to
+ release tlsdesc_table.
+ * sysdeps/i386/dl-machine.h: Include dl-tlsdesc.h.
+ (elf_machine_type_class): Mark R_386_TLS_DESC as PLT class.
+ (elf_machine_rel): Handle R_386_TLS_DESC.
+ (elf_machine_rela): Likewise.
+ (elf_machine_lazy_rel): Likewise.
+ (elf_machine_lazy_rela): Likewise.
+ * sysdeps/i386/dl-tls.h (struct dl_tls_index): Name it.
+ * sysdeps/i386/dl-tlsdesc.S: New file.
+ * sysdeps/i386/dl-tlsdesc.h: New file.
+ * sysdeps/i386/tlsdesc.c: New file.
+ * sysdeps/i386/tlsdesc.sym: New file.
+ * sysdeps/i386/bits/linkmap.h (struct link_map_machine): Add
+ tlsdesc_table.
+ * sysdeps/x86_64/Makefile (sysdep-dl-routines, sysdep_routines,
+ sysdep-rtld-routines): Add tlsdesc and dl-tlsdesc for elf subdir.
+ (gen-as-const-headers): Add tlsdesc.sym to csu subdir.
+ * sysdeps/x86_64/dl-lookupcfg.h: New file. Introduce _dl_unmap to
+ release tlsdesc_table.
+ * sysdeps/x86_64/dl-machine.h: Include dl-tlsdesc.h.
+ (elf_machine_runtime_setup): Set up lazy TLSDESC GOT entry.
+ (elf_machine_type_class): Mark R_X86_64_TLSDESC as PLT class.
+ (elf_machine_rel): Handle R_X86_64_TLSDESC.
+ (elf_machine_rela): Likewise.
+ (elf_machine_lazy_rel): Likewise.
+ * sysdeps/x86_64/dl-tls.h (struct dl_tls_index): Name it.
+ (__tls_get_addr): Do not declare for non-shared compiles.
+ * sysdeps/x86_64/dl-tlsdesc.S: New file.
+ * sysdeps/x86_64/dl-tlsdesc.h: New file.
+ * sysdeps/x86_64/tlsdesc.c: New file.
+ * sysdeps/x86_64/tlsdesc.sym: New file.
+ * sysdeps/x86_64/bits/linkmap.h (struct link_map_machine): Add
+ tlsdesc_table for both 32- and 64-bit structs.
+
2008-05-11 Ulrich Drepper <drepper@xxxxxxxxxx>
* elf/dl-tls.c (__tls_get_addr): Optimize by moving slow path in
Modified: trunk/libc/NEWS
==============================================================================
--- trunk/libc/NEWS (original)
+++ trunk/libc/NEWS Thu May 15 05:10:03 2008
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes. 2008-5-10
+GNU C Library NEWS -- history of user-visible changes. 2008-5-14
Copyright (C) 1992-2007, 2008 Free Software Foundation, Inc.
See the end for copying conditions.
@@ -8,7 +8,20 @@
Version 2.9
* Unified lookup for getaddrinfo: IPv4 and IPv6 addresses are now looked
- up at the same time.
+ up at the same time. Implemented by Ulrich Drepper.
+
+* TLS descriptors for LD and GD on x86 and x86-64.
+ Implemented by Alexandre Oliva.
+
+* getaddrinfo now handles DCCP and UDPlite.
+ Implemented by Ulrich Drepper.
+
+* New fixed-size conversion macros: htobe16, htole16, be16toh, le16toh,
+ htobe32, htole32, be32toh, le32toh, htobe64, htole64, be64toh, le64toh.
+ Implemented by Ulrich Drepper.
+
+* New implementation of memmem, strstr, and strcasestr which is O(n).
+ Implemented by Eric Blake.
Version 2.8
Modified: trunk/libc/bits/byteswap.h
==============================================================================
--- trunk/libc/bits/byteswap.h (original)
+++ trunk/libc/bits/byteswap.h Thu May 15 05:10:03 2008
@@ -1,5 +1,5 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997,1998,2000,2001,2002,2005 Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,2000-2002,2005,2008 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
@@ -17,7 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#if !defined _BYTESWAP_H && !defined _NETINET_IN_H
+#if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H
# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
#endif
Modified: trunk/libc/configure
==============================================================================
--- trunk/libc/configure (original)
+++ trunk/libc/configure Thu May 15 05:10:03 2008
@@ -5766,7 +5766,7 @@
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } \
&& grep -q .note.GNU-stack conftest.s \
- && { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Wa,--noexecstack
+ && { ac_try='${CC-cc} $ASFLAGS -Wa,--noexecstack
-c -o conftest.o conftest.s 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
Modified: trunk/libc/configure.in
==============================================================================
--- trunk/libc/configure.in (original)
+++ trunk/libc/configure.in Thu May 15 05:10:03 2008
@@ -1523,7 +1523,7 @@
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS
-S -o conftest.s conftest.c 1>&AS_MESSAGE_LOG_FD]) \
&& grep -q .note.GNU-stack conftest.s \
- && AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -Wa,--noexecstack
+ && AC_TRY_COMMAND([${CC-cc} $ASFLAGS -Wa,--noexecstack
-c -o conftest.o conftest.s 1>&AS_MESSAGE_LOG_FD])
then
libc_cv_as_noexecstack=yes
Modified: trunk/libc/elf/dl-conflict.c
==============================================================================
--- trunk/libc/elf/dl-conflict.c (original)
+++ trunk/libc/elf/dl-conflict.c Thu May 15 05:10:03 2008
@@ -1,5 +1,5 @@
/* Resolve conflicts against already prelinked libraries.
- Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@xxxxxxxxxx>, 2001.
@@ -44,7 +44,6 @@
/* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */
#define RESOLVE_MAP(ref, version, flags) (*ref = NULL, NULL)
#define RESOLVE(ref, version, flags) (*ref = NULL, 0)
-#define CHECK_STATIC_TLS(ref_map, sym_map) ((void) 0)
#define RESOLVE_CONFLICT_FIND_MAP(map, r_offset) \
do { \
while ((resolve_conflict_map->l_map_end < (ElfW(Addr)) (r_offset)) \
@@ -61,6 +60,12 @@
#include "dynamic-link.h"
+ /* Override these, defined in dynamic-link.h. */
+#undef CHECK_STATIC_TLS
+#define CHECK_STATIC_TLS(ref_map, sym_map) ((void) 0)
+#undef TRY_STATIC_TLS
+#define TRY_STATIC_TLS(ref_map, sym_map) (0)
+
GL(dl_num_cache_relocations) += conflictend - conflict;
for (; conflict < conflictend; ++conflict)
Modified: trunk/libc/elf/dl-reloc.c
==============================================================================
--- trunk/libc/elf/dl-reloc.c (original)
+++ trunk/libc/elf/dl-reloc.c Thu May 15 05:10:03 2008
@@ -1,5 +1,5 @@
/* Relocate a shared object and resolve its references to other loaded objects.
- Copyright (C) 1995-2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1995-2004, 2005, 2006, 2008 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
@@ -43,9 +43,9 @@
This function intentionally does not return any value but signals error
directly, as static TLS should be rare and code handling it should
not be inlined as much as possible. */
-void
-internal_function __attribute_noinline__
-_dl_allocate_static_tls (struct link_map *map)
+int
+internal_function
+_dl_try_allocate_static_tls (struct link_map *map)
{
/* If we've already used the variable with dynamic access, or if the
alignment requirements are too high, fail. */
@@ -53,8 +53,7 @@
|| map->l_tls_align > GL(dl_tls_static_align))
{
fail:
- _dl_signal_error (0, map->l_name, NULL, N_("\
-cannot allocate memory in static TLS block"));
+ return -1;
}
#if TLS_TCB_AT_TP
@@ -108,6 +107,20 @@
}
else
map->l_need_tls_init = 1;
+
+ return 0;
+}
+
+void
+internal_function __attribute_noinline__
+_dl_allocate_static_tls (struct link_map *map)
+{
+ if (map->l_tls_offset == FORCED_DYNAMIC_TLS_OFFSET
+ || _dl_try_allocate_static_tls (map))
+ {
+ _dl_signal_error (0, map->l_name, NULL, N_("\
+cannot allocate memory in static TLS block"));
+ }
}
/* Initialize static TLS area and DTV for current (only) thread.
@@ -248,23 +261,6 @@
l->l_lookup_cache.value = _lr; })) \
: l)
- /* This macro is used as a callback from elf_machine_rel{a,} when a
- static TLS reloc is about to be performed. Since (in dl-load.c) we
- permit dynamic loading of objects that might use such relocs, we
- have to check whether each use is actually doable. If the object
- whose TLS segment the reference resolves to was allocated space in
- the static TLS block at startup, then it's ok. Otherwise, we make
- an attempt to allocate it in surplus space on the fly. If that
- can't be done, we fall back to the error that DF_STATIC_TLS is
- intended to produce. */
-#define CHECK_STATIC_TLS(map, sym_map) \
- do { \
- if (__builtin_expect ((sym_map)->l_tls_offset == NO_TLS_OFFSET \
- || ((sym_map)->l_tls_offset \
- == FORCED_DYNAMIC_TLS_OFFSET), 0)) \
- _dl_allocate_static_tls (sym_map); \
- } while (0)
-
#include "dynamic-link.h"
ELF_DYNAMIC_RELOCATE (l, lazy, consider_profiling);
Modified: trunk/libc/elf/dynamic-link.h
==============================================================================
--- trunk/libc/elf/dynamic-link.h (original)
+++ trunk/libc/elf/dynamic-link.h Thu May 15 05:10:03 2008
@@ -1,5 +1,5 @@
/* Inline functions for dynamic linking.
- Copyright (C) 1995-2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1995-2005, 2006, 2008 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
@@ -16,6 +16,31 @@
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. */
+
+/* This macro is used as a callback from elf_machine_rel{a,} when a
+ static TLS reloc is about to be performed. Since (in dl-load.c) we
+ permit dynamic loading of objects that might use such relocs, we
+ have to check whether each use is actually doable. If the object
+ whose TLS segment the reference resolves to was allocated space in
+ the static TLS block at startup, then it's ok. Otherwise, we make
+ an attempt to allocate it in surplus space on the fly. If that
+ can't be done, we fall back to the error that DF_STATIC_TLS is
+ intended to produce. */
+#define CHECK_STATIC_TLS(map, sym_map) \
+ do { \
+ if (__builtin_expect ((sym_map)->l_tls_offset == NO_TLS_OFFSET \
+ || ((sym_map)->l_tls_offset \
+ == FORCED_DYNAMIC_TLS_OFFSET), 0)) \
+ _dl_allocate_static_tls (sym_map); \
+ } while (0)
+
+#define TRY_STATIC_TLS(map, sym_map) \
+ (__builtin_expect ((sym_map)->l_tls_offset \
+ != FORCED_DYNAMIC_TLS_OFFSET, 1) \
+ && (__builtin_expect ((sym_map)->l_tls_offset != NO_TLS_OFFSET, 1) \
+ || _dl_try_allocate_static_tls (sym_map) == 0))
+
+int internal_function _dl_try_allocate_static_tls (struct link_map *map);
#include <elf.h>
#include <assert.h>
Modified: trunk/libc/elf/elf.h
==============================================================================
--- trunk/libc/elf/elf.h (original)
+++ trunk/libc/elf/elf.h Thu May 15 05:10:03 2008
@@ -1159,8 +1159,17 @@
#define R_386_TLS_DTPMOD32 35 /* ID of module containing symbol */
#define R_386_TLS_DTPOFF32 36 /* Offset in TLS block */
#define R_386_TLS_TPOFF32 37 /* Negated offset in static TLS block */
+/* 38? */
+#define R_386_TLS_GOTDESC 39 /* GOT offset for TLS descriptor. */
+#define R_386_TLS_DESC_CALL 40 /* Marker of call through TLS
+ descriptor for
+ relaxation. */
+#define R_386_TLS_DESC 41 /* TLS descriptor containing
+ pointer to code and to
+ argument, returning the TLS
+ offset for the symbol. */
/* Keep this the last entry. */
-#define R_386_NUM 38
+#define R_386_NUM 42
/* SUN SPARC specific definitions. */
@@ -2557,8 +2566,17 @@
#define R_X86_64_GOTTPOFF 22 /* 32 bit signed PC relative offset
to GOT entry for IE symbol */
#define R_X86_64_TPOFF32 23 /* Offset in initial TLS block */
-
-#define R_X86_64_NUM 24
+#define R_X86_64_PC64 24 /* PC relative 64 bit */
+#define R_X86_64_GOTOFF64 25 /* 64 bit offset to GOT */
+#define R_X86_64_GOTPC32 26 /* 32 bit signed pc relative
+ offset to GOT */
+/* 27 .. 33 */
+#define R_X86_64_GOTPC32_TLSDESC 34 /* GOT offset for TLS descriptor. */
+#define R_X86_64_TLSDESC_CALL 35 /* Marker for call through TLS
+ descriptor. */
+#define R_X86_64_TLSDESC 36 /* TLS descriptor. */
+
+#define R_X86_64_NUM 37
/* AM33 relocations. */
Modified: trunk/libc/iconv/gconv_simple.c
==============================================================================
--- trunk/libc/iconv/gconv_simple.c (original)
+++ trunk/libc/iconv/gconv_simple.c Thu May 15 05:10:03 2008
@@ -1,5 +1,5 @@
/* Simple transformations functions.
- Copyright (C) 1997-2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1997-2005, 2007, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
@@ -820,9 +820,11 @@
STANDARD_FROM_LOOP_ERR_HANDLER (1); \
} \
else \
- /* It's an one byte sequence. */ \
- *((uint32_t *) outptr) = *inptr++; \
- outptr += sizeof (uint32_t); \
+ { \
+ /* It's an one byte sequence. */ \
+ *((uint32_t *) outptr) = *inptr++; \
+ outptr += sizeof (uint32_t); \
+ } \
}
#define LOOP_NEED_FLAGS
#include <iconv/loop.c>
@@ -851,9 +853,11 @@
STANDARD_TO_LOOP_ERR_HANDLER (4); \
} \
else \
- /* It's an one byte sequence. */ \
- *outptr++ = *((const uint32_t *) inptr); \
- inptr += sizeof (uint32_t); \
+ { \
+ /* It's an one byte sequence. */ \
+ *outptr++ = *((const uint32_t *) inptr); \
+ inptr += sizeof (uint32_t); \
+ } \
}
#define LOOP_NEED_FLAGS
#include <iconv/loop.c>
Modified: trunk/libc/iconvdata/Makefile
==============================================================================
--- trunk/libc/iconvdata/Makefile (original)
+++ trunk/libc/iconvdata/Makefile Thu May 15 05:10:03 2008
@@ -75,10 +75,10 @@
tests += bug-iconv3
endif
+test-srcs := tst-table-from tst-table-to
+
bug-iconv6-ENV = LOCPATH=$(common-objpfx)localedata
tst-iconv7-ENV = LOCPATH=$(common-objpfx)localedata
-
-test-srcs := tst-table-from tst-table-to
endif
# No code here is in libc.so.
Modified: trunk/libc/iconvdata/bug-iconv6.c
==============================================================================
--- trunk/libc/iconvdata/bug-iconv6.c (original)
+++ trunk/libc/iconvdata/bug-iconv6.c Thu May 15 05:10:03 2008
@@ -13,7 +13,7 @@
static int
do_test (void)
{
- setlocale (LC_ALL, "en_US.UTF-8");
+ setlocale (LC_ALL, "de_DE.UTF-8");
iconv_t ic = iconv_open ("ISO-2022-JP//TRANSLIT", "UTF-8");
if (ic == (iconv_t) -1)
{
Modified: trunk/libc/iconvdata/run-iconv-test.sh
==============================================================================
--- trunk/libc/iconvdata/run-iconv-test.sh (original)
+++ trunk/libc/iconvdata/run-iconv-test.sh Thu May 15 05:10:03 2008
@@ -1,6 +1,6 @@
#! /bin/sh -f
# Run available iconv(1) tests.
-# Copyright (C) 1998-2002, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1998-2002, 2005, 2006, 2008 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
#
@@ -137,7 +137,7 @@
done
fi
- if test "$subset" == N; then
+ if test "$subset" = N; then
echo $ac_n " suntzu: ASCII -> $to -> ASCII $ac_c"
$PROG -f ASCII -t $to testdata/suntzus |
$PROG -f $to -t ASCII > $temp1 ||
Modified: trunk/libc/inet/netinet/in.h
==============================================================================
--- trunk/libc/inet/netinet/in.h (original)
+++ trunk/libc/inet/netinet/in.h Thu May 15 05:10:03 2008
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2001, 2003, 2004, 2006, 2007
+/* Copyright (C) 1991-2001, 2003, 2004, 2006, 2007, 2008
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -53,6 +53,8 @@
#define IPPROTO_IDP IPPROTO_IDP
IPPROTO_TP = 29, /* SO Transport Protocol Class 4. */
#define IPPROTO_TP IPPROTO_TP
+ IPPROTO_DCCP = 33, /* Datagram Congestion Control Protocol. */
+#define IPPROTO_DCCP IPPROTO_DCCP
IPPROTO_IPV6 = 41, /* IPv6 header. */
#define IPPROTO_IPV6 IPPROTO_IPV6
IPPROTO_ROUTING = 43, /* IPv6 routing header. */
@@ -83,6 +85,8 @@
#define IPPROTO_COMP IPPROTO_COMP
IPPROTO_SCTP = 132, /* Stream Control Transmission Protocol. */
#define IPPROTO_SCTP IPPROTO_SCTP
+ IPPROTO_UDPLITE = 136, /* UDP-Lite protocol. */
+#define IPPROTO_UDPLITE IPPROTO_UDPLITE
IPPROTO_RAW = 255, /* Raw IP packets. */
#define IPPROTO_RAW IPPROTO_RAW
IPPROTO_MAX
Modified: trunk/libc/localedata/ChangeLog
==============================================================================
--- trunk/libc/localedata/ChangeLog (original)
+++ trunk/libc/localedata/ChangeLog Thu May 15 05:10:03 2008
@@ -1,3 +1,12 @@
+2008-05-14 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #6438]
+ * locales/iso14651_t1_common: Add sorting data for Telugu.
+
+ [BZ #6447]
+ * locales/be_BY: Fix yesexpr.
+ Patch by Alexander Mikhailian <mikhailian@xxxxxxxxxx>.
+
2008-04-15 Ulrich Drepper <drepper@xxxxxxxxxx>
* charmaps/UTF-8: Update for Unicode v5.1.
Modified: trunk/libc/localedata/locales/be_BY
==============================================================================
--- trunk/libc/localedata/locales/be_BY (original)
+++ trunk/libc/localedata/locales/be_BY Thu May 15 05:10:03 2008
@@ -69,7 +69,7 @@
END LC_CTYPE
LC_MESSAGES
-yesexpr "<U005E><U005B><U0414><U0434><U0059><U0079><U005D><U002E><U002A>"
+yesexpr "<U005E><U005B><U0422><U0442><U0059><U0079><U005D><U002E><U002A>"
noexpr "<U005E><U005B><U041D><U043D><U004E><U006E><U005D><U002E><U002A>"
END LC_MESSAGES
Modified: trunk/libc/localedata/locales/iso14651_t1_common
==============================================================================
--- trunk/libc/localedata/locales/iso14651_t1_common (original)
+++ trunk/libc/localedata/locales/iso14651_t1_common Thu May 15 05:10:03 2008
@@ -62,6 +62,7 @@
script <GEORGIAN>
script <DEVANAGARI>
script <GUJARATI>
+script <TELUGU>
# Déclaration des symboles internes / Declaration of internal symbols
#
@@ -652,6 +653,95 @@
collating-symbol <gvd-visarg>
collating-symbol <g-halant>
+# <TELUGU>
+#
+# tvd - denotes Telugu vowel modifier
+# tm - denotes Telugu matras
+# tvw - denotes Telugu vowels
+
+# defining symbols
+collating-symbol <tummu>
+collating-symbol <tvw-a>
+collating-symbol <tvw-aa>
+collating-symbol <tvw-i>
+collating-symbol <tvw-ii>
+collating-symbol <tvw-u>
+collating-symbol <tvw-uu>
+collating-symbol <tvw-vocalicr>
+collating-symbol <tvw-vocalicrr>
+collating-symbol <tvw-vocalicl>
+collating-symbol <tvw-vocalicll>
+collating-symbol <tvw-candrae>
+collating-symbol <tvw-shorte>
+collating-symbol <tvw-e>
+collating-symbol <tvw-ai>
+collating-symbol <tvw-shorto>
+collating-symbol <tvw-o>
+collating-symbol <tvw-au>
+collating-symbol <t-ka>
+collating-symbol <t-kha>
+collating-symbol <t-ga>
+collating-symbol <t-gga>
+collating-symbol <t-gha>
+collating-symbol <t-nga>
+collating-symbol <t-ca>
+collating-symbol <t-tsa>
+collating-symbol <t-cha>
+collating-symbol <t-ja>
+collating-symbol <t-dza>
+collating-symbol <t-jja>
+collating-symbol <t-jha>
+collating-symbol <t-nya>
+collating-symbol <t-tta>
+collating-symbol <t-ttha>
+collating-symbol <t-dda>
+collating-symbol <t-ddda>
+collating-symbol <t-ddha>
+collating-symbol <t-nna>
+collating-symbol <t-ta>
+collating-symbol <t-tha>
+collating-symbol <t-da>
+collating-symbol <t-dha>
+collating-symbol <t-na>
+collating-symbol <t-pa>
+collating-symbol <t-pha>
+collating-symbol <t-ba>
+collating-symbol <t-bba>
+collating-symbol <t-bha>
+collating-symbol <t-ma>
+collating-symbol <t-ya>
+collating-symbol <t-ra>
+collating-symbol <t-rra>
+collating-symbol <t-la>
+collating-symbol <t-lla>
+collating-symbol <t-va>
+collating-symbol <t-sha>
+collating-symbol <t-ssa>
+collating-symbol <t-sa>
+collating-symbol <t-ha>
+collating-symbol <t-avagrah>
+collating-symbol <tm-aa>
+collating-symbol <tm-i>
+collating-symbol <tm-ii>
+collating-symbol <tm-u>
+collating-symbol <tm-uu>
+collating-symbol <tm-vocalicr>
+collating-symbol <tm-vocalicrr>
+collating-symbol <tm-vocalicl>
+collating-symbol <tm-vocalicll>
+collating-symbol <tm-shorte>
+collating-symbol <tm-e>
+collating-symbol <tm-ai>
+collating-symbol <tm-shorto>
+collating-symbol <tm-o>
+collating-symbol <tm-au>
+collating-symbol <tvd-chandrabindu>
+collating-symbol <tvd-anuswara>
+collating-symbol <tvd-visarg>
+collating-symbol <t-halant>
+collating-symbol <t-lenghtmark>
+collating-symbol <t-ailenghtmark>
+
# Ordre des symboles internes / Order of internal symbols
#
# SYMB. N°
@@ -1236,6 +1326,92 @@
<gvd-chandrabindu>
<gvd-visarg>
<g-halant>
+#
+#<TELUGU>
+#
+# collation weights in order
+
+<tummu>
+<tvw-a>
+<tvw-aa>
+<tvw-i>
+<tvw-ii>
+<tvw-u>
+<tvw-uu>
+<tvw-vocalicr>
+<tvw-vocalicrr>
+<tvw-vocalicl>
+<tvw-vocalicll>
+<tvw-candrae>
+<tvw-shorte>
+<tvw-e>
+<tvw-ai>
+<tvw-shorto>
+<tvw-o>
+<tvw-au>
+<t-ka>
+<t-kha>
+<t-ga>
+<t-gga>
+<t-gha>
+<t-nga>
+<t-ca>
+<t-tsa>
+<t-cha>
+<t-ja>
+<t-dza>
+<t-jja>
+<t-jha>
+<t-nya>
+<t-tta>
+<t-ttha>
+<t-dda>
+<t-ddda>
+<t-ddha>
+<t-nna>
+<t-ta>
+<t-tha>
+<t-da>
+<t-dha>
+<t-na>
+<t-pa>
+<t-pha>
+<t-ba>
+<t-bba>
+<t-bha>
+<t-ma>
+<t-ya>
+<t-ra>
+<t-rra>
+<t-la>
+<t-lla>
+<t-va>
+<t-sha>
+<t-ssa>
+<t-sa>
+<t-ha>
+<t-avagrah>
+<tm-aa>
+<tm-i>
+<tm-ii>
+<tm-u>
+<tm-uu>
+<tm-vocalicr>
+<tm-vocalicrr>
+<tm-vocalicl>
+<tm-vocalicll>
+<tm-shorte>
+<tm-e>
+<tm-ai>
+<tm-shorto>
+<tm-o>
+<tm-au>
+<tvd-chandrabindu>
+<tvd-anuswara>
+<tvd-visarg>
+<t-halant>
+<t-lenghtmark>
+<t-ailenghtmark>
order_start <SPECIAL>;forward;backward;forward;forward,position
#
@@ -3201,6 +3377,103 @@
<U0ACD> <g-halant>;<BAS>;<MIN>;IGNORE
<U0ABC> IGNORE;<GNKT>;<MIN>;IGNORE
+order_start <TELUGU>;forward;forward;forward;forward,position
+<U0C66> <0>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0C78> <0>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0C67> <1>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0C79> <1>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0C7C> <1>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0C68> <2>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0C7A> <2>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0C7D> <2>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0C69> <3>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0C7B> <3>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0C7E> <3>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0C6A> <4>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0C6B> <5>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0C6C> <6>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0C6D> <7>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0C6E> <8>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0C6F> <9>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0C7F> <tummu> ;<BAS>;<MIN>;IGNORE
+<U0C05> <tvw-a> ;<BAS>;<MIN>;IGNORE
+<U0C06> <tvw-aa> ;<BAS>;<MIN>;IGNORE
+<U0C07> <tvw-i> ;<BAS>;<MIN>;IGNORE
+<U0C08> <tvw-ii> ;<BAS>;<MIN>;IGNORE
+<U0C09> <tvw-u> ;<BAS>;<MIN>;IGNORE
+<U0C0A> <tvw-uu>;<BAS>;<MIN>;IGNORE
+<U0C0B> <tvw-vocalicr>;<BAS>;<MIN>;IGNORE
+<U0C60> <tvw-vocalicrr>;<BAS>;<MIN>;IGNORE
+<U0C0C> <tvw-vocalicl>;<BAS>;<MIN>;IGNORE
+<U0C61> <tvw-vocalicll>;<BAS>;<MIN>;IGNORE
+<U0C0D> <tvw-candrae>;<BAS>;<MIN>;IGNORE
+<U0C0E> <tvw-shorte>;<BAS>;<MIN>;IGNORE
+<U0C0F> <tvw-e>;<BAS>;<MIN>;IGNORE
+<U0C10> <tvw-ai>;<BAS>;<MIN>;IGNORE
+<U0C12> <tvw-shorto>;<BAS>;<MIN>;IGNORE
+<U0C13> <tvw-o>;<BAS>;<MIN>;IGNORE
+<U0C14> <tvw-au>;<BAS>;<MIN>;IGNORE
+<U0C15> <t-ka>;<BAS>;<MIN>;IGNORE
+<U0C16> <t-kha>;<BAS>;<MIN>;IGNORE
+<U0C17> <t-ga>;<BAS>;<MIN>;IGNORE
+<U0C7B> <t-gga>;<BAS>;<MIN>;IGNORE
+<U0C18> <t-gha>;<BAS>;<MIN>;IGNORE
+<U0C19> <t-nga>;<BAS>;<MIN>;IGNORE
+<U0C1A> <t-ca>;<BAS>;<MIN>;IGNORE
+<U0C58> <t-tsa>;<BAS>;<MIN>;IGNORE
+<U0C1B> <t-cha>;<BAS>;<MIN>;IGNORE
+<U0C1C> <t-ja>;<BAS>;<MIN>;IGNORE
+<U0C59> <t-dza>;<BAS>;<MIN>;IGNORE
+<U0C1D> <t-jha>;<BAS>;<MIN>;IGNORE
+<U0C1E> <t-nya>;<BAS>;<MIN>;IGNORE
+<U0C1F> <t-tta>;<BAS>;<MIN>;IGNORE
+<U0C20> <t-ttha>;<BAS>;<MIN>;IGNORE
+<U0C21> <t-dda>;<BAS>;<MIN>;IGNORE
+<U0C22> <t-ddha>;<BAS>;<MIN>;IGNORE
+<U0C23> <t-nna>;<BAS>;<MIN>;IGNORE
+<U0C24> <t-ta>;<BAS>;<MIN>;IGNORE
+<U0C25> <t-tha>;<BAS>;<MIN>;IGNORE
+<U0C26> <t-da>;<BAS>;<MIN>;IGNORE
+<U0C27> <t-dha>;<BAS>;<MIN>;IGNORE
+<U0C28> <t-na>;<BAS>;<MIN>;IGNORE
+<U0C2A> <t-pa>;<BAS>;<MIN>;IGNORE
+<U0C2B> <t-pha>;<BAS>;<MIN>;IGNORE
+<U0C2C> <t-ba>;<BAS>;<MIN>;IGNORE
+<U0C2D> <t-bha>;<BAS>;<MIN>;IGNORE
+<U0C2E> <t-ma>;<BAS>;<MIN>;IGNORE
+<U0C2F> <t-ya>;<BAS>;<MIN>;IGNORE
+<U0C30> <t-ra>;<BAS>;<MIN>;IGNORE
+<U0C31> <t-rra>;<BAS>;<MIN>;IGNORE
+<U0C32> <t-la>;<BAS>;<MIN>;IGNORE
+<U0C33> <t-lla>;<BAS>;<MIN>;IGNORE
+<U0C35> <t-va>;<BAS>;<MIN>;IGNORE
+<U0C36> <t-sha>;<BAS>;<MIN>;IGNORE
+<U0C37> <t-ssa>;<BAS>;<MIN>;IGNORE
+<U0C38> <t-sa>;<BAS>;<MIN>;IGNORE
+<U0C39> <t-ha>;<BAS>;<MIN>;IGNORE
+<U0C3D> <t-avagrah>;<BAS>;<MIN>;IGNORE
+<U0C3E> <tm-aa>;<BAS>;<MIN>;IGNORE
+<U0C3F> <tm-i>;<BAS>;<MIN>;IGNORE
+<U0C40> <tm-ii>;<BAS>;<MIN>;IGNORE
+<U0C41> <tm-u>;<BAS>;<MIN>;IGNORE
+<U0C42> <tm-uu>;<BAS>;<MIN>;IGNORE
+<U0C43> <tm-vocalicr>;<BAS>;<MIN>;IGNORE
+<U0C44> <tm-vocalicrr>;<BAS>;<MIN>;IGNORE
+<U0C62> <tm-vocalicl>;<BAS>;<MIN>;IGNORE
+<U0C63> <tm-vocalicll>;<BAS>;<MIN>;IGNORE
+<U0C46> <tm-shorte>;<BAS>;<MIN>;IGNORE
+<U0C47> <tm-e>;<BAS>;<MIN>;IGNORE
+<U0C48> <tm-ai>;<BAS>;<MIN>;IGNORE
+<U0C4A> <tm-shorto>;<BAS>;<MIN>;IGNORE
+<U0C4B> <tm-o>;<BAS>;<MIN>;IGNORE
+<U0C4C> <tm-au>;<BAS>;<MIN>;IGNORE
+<U0C01> <tvd-chandrabindu>;<BAS>;<MIN>;IGNORE
+<U0C02> <tvd-anuswara>;<BAS>;<MIN>;IGNORE
+<U0C03> <tvd-visarg>;<BAS>;<MIN>;IGNORE
+<U0C4D> <t-halant>;<BAS>;<MIN>;IGNORE
+<U0C55> <t-lenghtmark>;<BAS>;<MIN>;IGNORE
+<U0C56> <t-ailenghtmark>;<BAS>;<MIN>;IGNORE
+
order_end
END LC_COLLATE
Modified: trunk/libc/nss/getent.c
==============================================================================
--- trunk/libc/nss/getent.c (original)
+++ trunk/libc/nss/getent.c Thu May 15 05:10:03 2008
@@ -343,6 +343,22 @@
sockstr = "DGRAM";
else if (runp->ai_socktype == SOCK_RAW)
sockstr = "RAW";
+#ifdef SOCK_SEQPACKET
+ else if (runp->ai_socktype == SOCK_SEQPACKET)
+ sockstr = "SEQPACKET";
+#endif
+#ifdef SOCK_RDM
+ else if (runp->ai_socktype == SOCK_RDM)
+ sockstr = "RDM";
+#endif
+#ifdef SOCK_DCCP
+ else if (runp->ai_socktype == SOCK_DCCP)
+ sockstr = "DCCP";
+#endif
+#ifdef SOCK_PACKET
+ else if (runp->ai_socktype == SOCK_PACKET)
+ sockstr = "PACKET";
+#endif
else
{
snprintf (sockbuf, sizeof (sockbuf), "%d",
Modified: trunk/libc/posix/regcomp.c
==============================================================================
--- trunk/libc/posix/regcomp.c (original)
+++ trunk/libc/posix/regcomp.c Thu May 15 05:10:03 2008
@@ -1046,7 +1046,9 @@
case BUF_LAST:
break;
default:
- /* Word anchors etc. cannot be handled. */
+ /* Word anchors etc. cannot be handled. It's okay to test
+ opr.ctx_type since constraints (for all DFA nodes) are
+ created by ORing one or more opr.ctx_type values. */
return;
}
break;
@@ -1326,6 +1328,8 @@
node->node_idx = re_dfa_add_node (dfa, node->token);
if (BE (node->node_idx == -1, 0))
return REG_ESPACE;
+ if (node->token.type == ANCHOR)
+ dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type;
}
return REG_NOERROR;
}
@@ -1454,22 +1458,17 @@
destination. */
org_dest = dfa->edests[org_node].elems[0];
re_node_set_empty (dfa->edests + clone_node);
- if (dfa->nodes[org_node].type == ANCHOR)
+ /* If the node is root_node itself, it means the epsilon clsoure
+ has a loop. Then tie it to the destination of the root_node. */
+ if (org_node == root_node && clone_node != org_node)
{
- /* In case of the node has another constraint, append it. */
- if (org_node == root_node && clone_node != org_node)
- {
- /* ...but if the node is root_node itself, it means the
- epsilon closure have a loop, then tie it to the
- destination of the root_node. */
- ret = re_node_set_insert (dfa->edests + clone_node,
- org_dest);
- if (BE (ret < 0, 0))
- return REG_ESPACE;
- break;
- }
- constraint |= dfa->nodes[org_node].opr.ctx_type;
+ ret = re_node_set_insert (dfa->edests + clone_node, org_dest);
+ if (BE (ret < 0, 0))
+ return REG_ESPACE;
+ break;
}
+ /* In case of the node has another constraint, add it. */
+ constraint |= dfa->nodes[org_node].constraint;
clone_dest = duplicate_node (dfa, org_dest, constraint);
if (BE (clone_dest == -1, 0))
return REG_ESPACE;
@@ -1487,7 +1486,7 @@
clone_dest = search_duplicated_node (dfa, org_dest, constraint);
if (clone_dest == -1)
{
- /* There are no such a duplicated node, create a new one. */
+ /* There is no such duplicated node, create a new one. */
reg_errcode_t err;
clone_dest = duplicate_node (dfa, org_dest, constraint);
if (BE (clone_dest == -1, 0))
@@ -1502,7 +1501,7 @@
}
else
{
- /* There are a duplicated node which satisfy the constraint,
+ /* There is a duplicated node which satisfies the constraint,
use it to avoid infinite loop. */
ret = re_node_set_insert (dfa->edests + clone_node, clone_dest);
if (BE (ret < 0, 0))
@@ -1551,8 +1550,7 @@
if (BE (dup_idx != -1, 1))
{
dfa->nodes[dup_idx].constraint = constraint;
- if (dfa->nodes[org_idx].type == ANCHOR)
- dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].opr.ctx_type;
+ dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint;
dfa->nodes[dup_idx].duplicated = 1;
/* Store the index of the original node. */
@@ -1632,7 +1630,6 @@
calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, int node, int root)
{
reg_errcode_t err;
- unsigned int constraint;
int i, incomplete;
re_node_set eclosure;
incomplete = 0;
@@ -1644,15 +1641,14 @@
We reference this value to avoid infinite loop. */
dfa->eclosures[node].nelem = -1;
- constraint = ((dfa->nodes[node].type == ANCHOR)
- ? dfa->nodes[node].opr.ctx_type : 0);
- /* If the current node has constraints, duplicate all nodes.
- Since they must inherit the constraints. */
- if (constraint
+ /* If the current node has constraints, duplicate all nodes
+ since they must inherit the constraints. */
+ if (dfa->nodes[node].constraint
&& dfa->edests[node].nelem
&& !dfa->nodes[dfa->edests[node].elems[0]].duplicated)
{
- err = duplicate_node_closure (dfa, node, node, node, constraint);
+ err = duplicate_node_closure (dfa, node, node, node,
+ dfa->nodes[node].constraint);
if (BE (err != REG_NOERROR, 0))
return err;
}
Modified: trunk/libc/posix/regex_internal.c
==============================================================================
--- trunk/libc/posix/regex_internal.c (original)
+++ trunk/libc/posix/regex_internal.c Thu May 15 05:10:03 2008
@@ -1666,11 +1666,9 @@
for (i = 0 ; i < nodes->nelem ; i++)
{
- unsigned int constraint = 0;
re_token_t *node = dfa->nodes + nodes->elems[i];
re_token_type_t type = node->type;
- if (node->constraint)
- constraint = node->constraint;
+ unsigned int constraint = node->constraint;
if (type == CHARACTER && !constraint)
continue;
@@ -1683,8 +1681,6 @@
newstate->halt = 1;
else if (type == OP_BACK_REF)
newstate->has_backref = 1;
- else if (type == ANCHOR)
- constraint = node->opr.ctx_type;
if (constraint)
{
Modified: trunk/libc/posix/tst-rfc3484-2.c
==============================================================================
--- trunk/libc/posix/tst-rfc3484-2.c (original)
+++ trunk/libc/posix/tst-rfc3484-2.c Thu May 15 05:10:03 2008
@@ -18,22 +18,33 @@
*in6ai = NULL;
*in6ailen = 0;
}
+
void
attribute_hidden
__check_native (uint32_t a1_index, int *a1_native,
uint32_t a2_index, int *a2_native)
{
}
+
int
+attribute_hidden
__idna_to_ascii_lz (const char *input, char **output, int flags)
{
return 0;
}
+
int
+attribute_hidden
__idna_to_unicode_lzlz (const char *input, char **output, int flags)
{
*output = NULL;
return 0;
+}
+
+void
+attribute_hidden
+_res_hconf_init (void)
+{
}
#include "../sysdeps/posix/getaddrinfo.c"
Modified: trunk/libc/posix/tst-rfc3484-3.c
==============================================================================
--- trunk/libc/posix/tst-rfc3484-3.c (original)
+++ trunk/libc/posix/tst-rfc3484-3.c Thu May 15 05:10:03 2008
@@ -18,22 +18,33 @@
*in6ai = NULL;
*in6ailen = 0;
}
+
void
attribute_hidden
__check_native (uint32_t a1_index, int *a1_native,
uint32_t a2_index, int *a2_native)
{
}
+
int
+attribute_hidden
__idna_to_ascii_lz (const char *input, char **output, int flags)
{
return 0;
}
+
int
+attribute_hidden
__idna_to_unicode_lzlz (const char *input, char **output, int flags)
{
*output = NULL;
return 0;
+}
+
+void
+attribute_hidden
+_res_hconf_init (void)
+{
}
#include "../sysdeps/posix/getaddrinfo.c"
Modified: trunk/libc/posix/tst-rfc3484.c
==============================================================================
--- trunk/libc/posix/tst-rfc3484.c (original)
+++ trunk/libc/posix/tst-rfc3484.c Thu May 15 05:10:03 2008
@@ -18,22 +18,33 @@
*in6ai = NULL;
*in6ailen = 0;
}
+
void
attribute_hidden
__check_native (uint32_t a1_index, int *a1_native,
uint32_t a2_index, int *a2_native)
{
}
+
int
+attribute_hidden
__idna_to_ascii_lz (const char *input, char **output, int flags)
{
return 0;
}
+
int
+attribute_hidden
__idna_to_unicode_lzlz (const char *input, char **output, int flags)
{
*output = NULL;
return 0;
+}
+
+void
+attribute_hidden
+_res_hconf_init (void)
+{
}
#include "../sysdeps/posix/getaddrinfo.c"
Modified: trunk/libc/string/Makefile
==============================================================================
--- trunk/libc/string/Makefile (original)
+++ trunk/libc/string/Makefile Thu May 15 05:10:03 2008
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2002, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1991-2002, 2005-2007, 2008 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
@@ -58,11 +58,12 @@
bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap \
tst-strtok tst-strfry \
bug-strtok1 $(addprefix test-,$(strop-tests)) \
- tst-strxfrm2
+ tst-strxfrm2 tst-endian
tests-$(OPTION_EGLIBC_ENVZ) += bug-envz1
tests-$(OPTION_EGLIBC_LOCALE_CODE) \
+= tst-strxfrm bug-strcoll1
-distribute := memcopy.h pagecopy.h tst-svc.expect test-string.h
+distribute := memcopy.h pagecopy.h tst-svc.expect test-string.h \
+ str-two-way.h
include ../Rules
Modified: trunk/libc/string/endian.h
==============================================================================
--- trunk/libc/string/endian.h (original)
+++ trunk/libc/string/endian.h Thu May 15 05:10:03 2008
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996, 1997, 2000, 2008 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
@@ -55,4 +55,40 @@
# define __LONG_LONG_PAIR(HI, LO) HI, LO
#endif
+
+/* Conversion interfaces. */
+#include <bits/byteswap.h>
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# define htobe16(x) __bswap_16 (x)
+# define htole16(x) (x)
+# define be16toh(x) __bswap_16 (x)
+# define le16toh(x) (x)
+
+# define htobe32(x) __bswap_32 (x)
+# define htole32(x) (x)
+# define be32toh(x) __bswap_32 (x)
+# define le32toh(x) (x)
+
+# define htobe64(x) __bswap_64 (x)
+# define htole64(x) (x)
+# define be64toh(x) __bswap_64 (x)
+# define le64toh(x) (x)
+#else
+# define htobe16(x) (x)
+# define htole16(x) __bswap_16 (x)
+# define be16toh(x) (x)
+# define le16toh(x) __bswap_16 (x)
+
+# define htobe32(x) (x)
+# define htole32(x) __bswap_32 (x)
+# define be32toh(x) (x)
+# define le32toh(x) __bswap_32 (x)
+
+# define htobe64(x) (x)
+# define htole64(x) __bswap_64 (x)
+# define be64toh(x) (x)
+# define le64toh(x) __bswap_64 (x)
+#endif
+
#endif /* endian.h */
Modified: trunk/libc/string/memmem.c
==============================================================================
--- trunk/libc/string/memmem.c (original)
+++ trunk/libc/string/memmem.c Thu May 15 05:10:03 2008
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,94,96,97,98,2000,2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,94,96,97,98,2000,2004,2008 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
@@ -16,26 +16,36 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <stddef.h>
+/* This particular implementation was written by Eric Blake, 2008. */
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+/* Specification of memmem. */
#include <string.h>
#ifndef _LIBC
# define __builtin_expect(expr, val) (expr)
#endif
+#define RETURN_TYPE void *
+#define AVAILABLE(h, h_l, j, n_l) ((j) <= (h_l) - (n_l))
+#include "str-two-way.h"
+
#undef memmem
-/* Return the first occurrence of NEEDLE in HAYSTACK. */
+/* Return the first occurrence of NEEDLE in HAYSTACK. Return HAYSTACK
+ if NEEDLE_LEN is 0, otherwise NULL if NEEDLE is not found in
+ HAYSTACK. */
void *
-memmem (haystack, haystack_len, needle, needle_len)
- const void *haystack;
- size_t haystack_len;
- const void *needle;
- size_t needle_len;
+memmem (const void *haystack_start, size_t haystack_len,
+ const void *needle_start, size_t needle_len)
{
- const char *begin;
- const char *const last_possible
- = (const char *) haystack + haystack_len - needle_len;
+ /* Abstract memory is considered to be an array of 'unsigned char' values,
+ not an array of 'char' values. See ISO C 99 section 6.2.6.1. */
+ const unsigned char *haystack = (const unsigned char *) haystack_start;
+ const unsigned char *needle = (const unsigned char *) needle_start;
if (needle_len == 0)
/* The first occurrence of the empty string is deemed to occur at
@@ -47,12 +57,22 @@
if (__builtin_expect (haystack_len < needle_len, 0))
return NULL;
- for (begin = (const char *) haystack; begin <= last_possible; ++begin)
- if (begin[0] == ((const char *) needle)[0] &&
- !memcmp ((const void *) &begin[1],
- (const void *) ((const char *) needle + 1),
- needle_len - 1))
- return (void *) begin;
+ /* Use optimizations in memchr when possible, to reduce the search
+ size of haystack using a linear algorithm with a smaller
+ coefficient. However, avoid memchr for long needles, since we
+ can often achieve sublinear performance. */
+ if (needle_len < LONG_NEEDLE_THRESHOLD)
+ {
+ haystack = memchr (haystack, *needle, haystack_len);
+ if (!haystack || __builtin_expect (needle_len == 1, 0))
+ return (void *) haystack;
+ haystack_len -= haystack - (const unsigned char *) haystack_start;
+ if (haystack_len < needle_len)
+ return NULL;
+ return two_way_short_needle (haystack, haystack_len, needle, needle_len);
+ }
+ else
+ return two_way_long_needle (haystack, haystack_len, needle, needle_len);
+}
- return NULL;
-}
+#undef LONG_NEEDLE_THRESHOLD
Modified: trunk/libc/string/strcasestr.c
==============================================================================
--- trunk/libc/string/strcasestr.c (original)
+++ trunk/libc/string/strcasestr.c Thu May 15 05:10:03 2008
@@ -1,5 +1,5 @@
/* Return the offset of one string within another.
- Copyright (C) 1994, 1996-2000, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1996-2000, 2004, 2008 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
@@ -30,113 +30,71 @@
# include <config.h>
#endif
+/* Specification. */
+#include <string.h>
+
#include <ctype.h>
+#include <stdbool.h>
+#include <strings.h>
-#if defined _LIBC || defined HAVE_STRING_H
-# include <string.h>
-#endif
+#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
-#ifdef _LIBC
-# include <locale/localeinfo.h>
-# define TOLOWER(c) __tolower_l ((unsigned char) c, loc)
-#else
-# define TOLOWER(c) _tolower (c)
-#endif
-
-typedef unsigned chartype;
+/* Two-Way algorithm. */
+#define RETURN_TYPE char *
+#define AVAILABLE(h, h_l, j, n_l) \
+ (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \
+ && ((h_l) = (j) + (n_l)))
+#define CANON_ELEMENT(c) TOLOWER (c)
+#define CMP_FUNC(p1, p2, l) \
+ strncasecmp ((const char *) (p1), (const char *) (p2), l)
+#include "str-two-way.h"
#undef strcasestr
#undef __strcasestr
+/* Find the first occurrence of NEEDLE in HAYSTACK, using
+ case-insensitive comparison. This function gives unspecified
+ results in multibyte locales. */
char *
-__strcasestr (phaystack, pneedle)
- const char *phaystack;
- const char *pneedle;
+__strcasestr (const char *haystack_start, const char *needle_start)
{
- register const unsigned char *haystack, *needle;
- register chartype b, c;
-#ifdef _LIBC
- __locale_t loc = _NL_CURRENT_LOCALE;
-#endif
+ const char *haystack = haystack_start;
+ const char *needle = needle_start;
+ size_t needle_len; /* Length of NEEDLE. */
+ size_t haystack_len; /* Known minimum length of HAYSTACK. */
+ bool ok = true; /* True if NEEDLE is prefix of HAYSTACK. */
- haystack = (const unsigned char *) phaystack;
- needle = (const unsigned char *) pneedle;
+ /* Determine length of NEEDLE, and in the process, make sure
+ HAYSTACK is at least as long (no point processing all of a long
+ NEEDLE if HAYSTACK is too short). */
+ while (*haystack && *needle)
+ {
+ ok &= (TOLOWER ((unsigned char) *haystack)
+ == TOLOWER ((unsigned char) *needle));
+ haystack++;
+ needle++;
+ }
+ if (*needle)
+ return NULL;
+ if (ok)
+ return (char *) haystack_start;
+ needle_len = needle - needle_start;
+ haystack = haystack_start + 1;
+ haystack_len = needle_len - 1;
- b = TOLOWER (*needle);
- if (b != '\0')
- {
- haystack--; /* possible ANSI violation */
- do
- {
- c = *++haystack;
- if (c == '\0')
- goto ret0;
- }
- while (TOLOWER (c) != (int) b);
-
- c = TOLOWER (*++needle);
- if (c == '\0')
- goto foundneedle;
- ++needle;
- goto jin;
-
- for (;;)
- {
- register chartype a;
- register const unsigned char *rhaystack, *rneedle;
-
- do
- {
- a = *++haystack;
- if (a == '\0')
- goto ret0;
- if (TOLOWER (a) == (int) b)
- break;
- a = *++haystack;
- if (a == '\0')
- goto ret0;
-shloop:
- ;
- }
- while (TOLOWER (a) != (int) b);
-
-jin: a = *++haystack;
- if (a == '\0')
- goto ret0;
-
- if (TOLOWER (a) != (int) c)
- goto shloop;
-
- rhaystack = haystack-- + 1;
- rneedle = needle;
- a = TOLOWER (*rneedle);
-
- if (TOLOWER (*rhaystack) == (int) a)
- do
- {
- if (a == '\0')
- goto foundneedle;
- ++rhaystack;
- a = TOLOWER (*++needle);
- if (TOLOWER (*rhaystack) != (int) a)
- break;
- if (a == '\0')
- goto foundneedle;
- ++rhaystack;
- a = TOLOWER (*++needle);
- }
- while (TOLOWER (*rhaystack) == (int) a);
-
- needle = rneedle; /* took the register-poor approach */
-
- if (a == '\0')
- break;
- }
- }
-foundneedle:
- return (char*) haystack;
-ret0:
- return 0;
+ /* Perform the search. Abstract memory is considered to be an array
+ of 'unsigned char' values, not an array of 'char' values. See
+ ISO C 99 section 6.2.6.1. */
+ if (needle_len < LONG_NEEDLE_THRESHOLD)
+ return two_way_short_needle ((const unsigned char *) haystack,
+ haystack_len,
+ (const unsigned char *) needle_start,
+ needle_len);
+ return two_way_long_needle ((const unsigned char *) haystack, haystack_len,
+ (const unsigned char *) needle_start,
+ needle_len);
}
+#undef LONG_NEEDLE_THRESHOLD
+
weak_alias (__strcasestr, strcasestr)
Modified: trunk/libc/string/strstr.c
==============================================================================
--- trunk/libc/string/strstr.c (original)
+++ trunk/libc/string/strstr.c Thu May 15 05:10:03 2008
@@ -1,5 +1,5 @@
/* Return the offset of one string within another.
- Copyright (C) 1994,1996,1997,2000,2001,2003 Free Software Foundation, Inc.
+ Copyright (C) 1994,1996,1997,2000,2001,2003,2008 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
@@ -17,107 +17,71 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-/*
- * My personal strstr() implementation that beats most other algorithms.
- * Until someone tells me otherwise, I assume that this is the
- * fastest implementation of strstr() in C.
- * I deliberately chose not to comment it. You should have at least
- * as much fun trying to understand it, as I had to write it :-).
- *
- * Stephen R. van den Berg, berg@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx */
+/* This particular implementation was written by Eric Blake, 2008. */
-#if HAVE_CONFIG_H
+#ifndef _LIBC
# include <config.h>
#endif
-#if defined _LIBC || defined HAVE_STRING_H
-# include <string.h>
+/* Specification of strstr. */
+#include <string.h>
+
+#include <stdbool.h>
+
+#ifndef _LIBC
+# define __builtin_expect(expr, val) (expr)
#endif
-typedef unsigned chartype;
+#define RETURN_TYPE char *
+#define AVAILABLE(h, h_l, j, n_l) \
+ (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \
+ && ((h_l) = (j) + (n_l)))
+#include "str-two-way.h"
#undef strstr
+/* Return the first occurrence of NEEDLE in HAYSTACK. Return HAYSTACK
+ if NEEDLE is empty, otherwise NULL if NEEDLE is not found in
+ HAYSTACK. */
char *
-strstr (phaystack, pneedle)
- const char *phaystack;
- const char *pneedle;
+strstr (const char *haystack_start, const char *needle_start)
{
- const unsigned char *haystack, *needle;
- chartype b;
- const unsigned char *rneedle;
+ const char *haystack = haystack_start;
+ const char *needle = needle_start;
+ size_t needle_len; /* Length of NEEDLE. */
+ size_t haystack_len; /* Known minimum length of HAYSTACK. */
+ bool ok = true; /* True if NEEDLE is prefix of HAYSTACK. */
- haystack = (const unsigned char *) phaystack;
+ /* Determine length of NEEDLE, and in the process, make sure
+ HAYSTACK is at least as long (no point processing all of a long
+ NEEDLE if HAYSTACK is too short). */
+ while (*haystack && *needle)
+ ok &= *haystack++ == *needle++;
+ if (*needle)
+ return NULL;
+ if (ok)
+ return (char *) haystack_start;
- if ((b = *(needle = (const unsigned char *) pneedle)))
- {
- chartype c;
- haystack--; /* possible ANSI violation */
+ /* Reduce the size of haystack using strchr, since it has a smaller
+ linear coefficient than the Two-Way algorithm. */
+ needle_len = needle - needle_start;
+ haystack = strchr (haystack_start + 1, *needle_start);
+ if (!haystack || __builtin_expect (needle_len == 1, 0))
+ return (char *) haystack;
+ needle -= needle_len;
+ haystack_len = (haystack > haystack_start + needle_len ? 1
+ : needle_len + haystack_start - haystack);
- {
- chartype a;
- do
- if (!(a = *++haystack))
- goto ret0;
- while (a != b);
- }
-
- if (!(c = *++needle))
- goto foundneedle;
- ++needle;
- goto jin;
-
- for (;;)
- {
- {
- chartype a;
- if (0)
- jin:{
- if ((a = *++haystack) == c)
- goto crest;
- }
- else
- a = *++haystack;
- do
- {
- for (; a != b; a = *++haystack)
- {
- if (!a)
- goto ret0;
- if ((a = *++haystack) == b)
- break;
- if (!a)
- goto ret0;
- }
- }
- while ((a = *++haystack) != c);
- }
- crest:
- {
- chartype a;
- {
- const unsigned char *rhaystack;
- if (*(rhaystack = haystack-- + 1) == (a = *(rneedle = needle)))
- do
- {
- if (!a)
- goto foundneedle;
- if (*++rhaystack != (a = *++needle))
- break;
- if (!a)
- goto foundneedle;
- }
- while (*++rhaystack == (a = *++needle));
- needle = rneedle; /* took the register-poor aproach */
- }
- if (!a)
- break;
- }
- }
- }
-foundneedle:
- return (char *) haystack;
-ret0:
- return 0;
+ /* Perform the search. Abstract memory is considered to be an array
+ of 'unsigned char' values, not an array of 'char' values. See
+ ISO C 99 section 6.2.6.1. */
+ if (needle_len < LONG_NEEDLE_THRESHOLD)
+ return two_way_short_needle ((const unsigned char *) haystack,
+ haystack_len,
+ (const unsigned char *) needle, needle_len);
+ return two_way_long_needle ((const unsigned char *) haystack, haystack_len,
+ (const unsigned char *) needle, needle_len);
}
libc_hidden_builtin_def (strstr)
+
+#undef LONG_NEEDLE_THRESHOLD
Modified: trunk/libc/sysdeps/i386/Makefile
==============================================================================
--- trunk/libc/sysdeps/i386/Makefile (original)
+++ trunk/libc/sysdeps/i386/Makefile Thu May 15 05:10:03 2008
@@ -65,3 +65,13 @@
ifneq (,$(filter -mno-tls-direct-seg-refs,$(CFLAGS)))
defines += -DNO_TLS_DIRECT_SEG_REFS
endif
+
+ifeq ($(subdir),elf)
+sysdep-dl-routines += tlsdesc dl-tlsdesc
+sysdep_routines += tlsdesc dl-tlsdesc
+sysdep-rtld-routines += tlsdesc dl-tlsdesc
+endif
+
+ifeq ($(subdir),csu)
+gen-as-const-headers += tlsdesc.sym
+endif
Modified: trunk/libc/sysdeps/i386/bits/byteswap.h
==============================================================================
--- trunk/libc/sysdeps/i386/bits/byteswap.h (original)
+++ trunk/libc/sysdeps/i386/bits/byteswap.h Thu May 15 05:10:03 2008
@@ -1,5 +1,5 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997, 1998, 2000, 2002, 2003, 2006, 2007
+ Copyright (C) 1997, 1998, 2000, 2002, 2003, 2006, 2007, 2008
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -18,7 +18,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#if !defined _BYTESWAP_H && !defined _NETINET_IN_H
+#if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H
# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
#endif
Modified: trunk/libc/sysdeps/i386/bits/linkmap.h
==============================================================================
--- trunk/libc/sysdeps/i386/bits/linkmap.h (original)
+++ trunk/libc/sysdeps/i386/bits/linkmap.h Thu May 15 05:10:03 2008
@@ -2,4 +2,5 @@
{
Elf32_Addr plt; /* Address of .plt + 0x16 */
Elf32_Addr gotplt; /* Address of .got + 0x0c */
+ void *tlsdesc_table; /* Address of TLS descriptor hash table. */
};
Modified: trunk/libc/sysdeps/i386/dl-machine.h
==============================================================================
--- trunk/libc/sysdeps/i386/dl-machine.h (original)
+++ trunk/libc/sysdeps/i386/dl-machine.h Thu May 15 05:10:03 2008
@@ -25,6 +25,7 @@
#include <sys/param.h>
#include <sysdep.h>
#include <tls.h>
+#include <dl-tlsdesc.h>
/* Return nonzero iff ELF header is compatible with the running host. */
static inline int __attribute__ ((unused))
@@ -246,7 +247,7 @@
# define elf_machine_type_class(type) \
((((type) == R_386_JMP_SLOT || (type) == R_386_TLS_DTPMOD32 \
|| (type) == R_386_TLS_DTPOFF32 || (type) == R_386_TLS_TPOFF32 \
- || (type) == R_386_TLS_TPOFF) \
+ || (type) == R_386_TLS_TPOFF || (type) == R_386_TLS_DESC) \
* ELF_RTYPE_CLASS_PLT) \
| (((type) == R_386_COPY) * ELF_RTYPE_CLASS_COPY))
#else
@@ -373,6 +374,38 @@
*reloc_addr = sym->st_value;
# endif
break;
+ case R_386_TLS_DESC:
+ {
+ struct tlsdesc volatile *td =
+ (struct tlsdesc volatile *)reloc_addr;
+
+# ifndef RTLD_BOOTSTRAP
+ if (! sym)
+ td->entry = _dl_tlsdesc_undefweak;
+ else
+# endif
+ {
+# ifndef RTLD_BOOTSTRAP
+# ifndef SHARED
+ CHECK_STATIC_TLS (map, sym_map);
+# else
+ if (!TRY_STATIC_TLS (map, sym_map))
+ {
+ td->arg = _dl_make_tlsdesc_dynamic
+ (sym_map, sym->st_value + (ElfW(Word))td->arg);
+ td->entry = _dl_tlsdesc_dynamic;
+ }
+ else
+# endif
+# endif
+ {
+ td->arg = (void*)(sym->st_value - sym_map->l_tls_offset
+ + (ElfW(Word))td->arg);
+ td->entry = _dl_tlsdesc_return;
+ }
+ }
+ break;
+ }
case R_386_TLS_TPOFF32:
/* The offset is positive, backward from the thread pointer. */
# ifdef RTLD_BOOTSTRAP
@@ -485,6 +518,41 @@
Therefore the offset is already correct. */
*reloc_addr = (sym == NULL ? 0 : sym->st_value) + reloc->r_addend;
break;
+ case R_386_TLS_DESC:
+ {
+ struct tlsdesc volatile *td =
+ (struct tlsdesc volatile *)reloc_addr;
+
+# ifndef RTLD_BOOTSTRAP
+ if (!sym)
+ {
+ td->arg = (void*)reloc->r_addend;
+ td->entry = _dl_tlsdesc_undefweak;
+ }
+ else
+# endif
+ {
+# ifndef RTLD_BOOTSTRAP
+# ifndef SHARED
+ CHECK_STATIC_TLS (map, sym_map);
+# else
+ if (!TRY_STATIC_TLS (map, sym_map))
+ {
+ td->arg = _dl_make_tlsdesc_dynamic
+ (sym_map, sym->st_value + reloc->r_addend);
+ td->entry = _dl_tlsdesc_dynamic;
+ }
+ else
+# endif
+# endif
+ {
+ td->arg = (void*)(sym->st_value - sym_map->l_tls_offset
+ + reloc->r_addend);
+ td->entry = _dl_tlsdesc_return;
+ }
+ }
+ }
+ break;
case R_386_TLS_TPOFF32:
/* The offset is positive, backward from the thread pointer. */
/* We know the offset of object the symbol is contained in.
@@ -578,6 +646,53 @@
*reloc_addr = (map->l_mach.plt
+ (((Elf32_Addr) reloc_addr) - map->l_mach.gotplt) * 4);
}
+ else if (__builtin_expect (r_type == R_386_TLS_DESC, 1))
+ {
+ struct tlsdesc volatile * __attribute__((__unused__)) td =
+ (struct tlsdesc volatile *)reloc_addr;
+
+ /* Handle relocations that reference the local *ABS* in a simple
+ way, so as to preserve a potential addend. */
+ if (ELF32_R_SYM (reloc->r_info) == 0)
+ td->entry = _dl_tlsdesc_resolve_abs_plus_addend;
+ /* Given a known-zero addend, we can store a pointer to the
+ reloc in the arg position. */
+ else if (td->arg == 0)
+ {
+ td->arg = (void*)reloc;
+ td->entry = _dl_tlsdesc_resolve_rel;
+ }
+ else
+ {
+ /* We could handle non-*ABS* relocations with non-zero addends
+ by allocating dynamically an arg to hold a pointer to the
+ reloc, but that sounds pointless. */
+ const Elf32_Rel *const r = reloc;
+ /* The code below was borrowed from elf_dynamic_do_rel(). */
+ const ElfW(Sym) *const symtab =
+ (const void *) D_PTR (map, l_info[DT_SYMTAB]);
+
+#ifdef RTLD_BOOTSTRAP
+ /* The dynamic linker always uses versioning. */
+ assert (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL);
+#else
+ if (map->l_info[VERSYMIDX (DT_VERSYM)])
+#endif
+ {
+ const ElfW(Half) *const version =
+ (const void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]);
+ ElfW(Half) ndx = version[ELFW(R_SYM) (r->r_info)] & 0x7fff;
+ elf_machine_rel (map, r, &symtab[ELFW(R_SYM) (r->r_info)],
+ &map->l_versions[ndx],
+ (void *) (l_addr + r->r_offset));
+ }
+#ifndef RTLD_BOOTSTRAP
+ else
+ elf_machine_rel (map, r, &symtab[ELFW(R_SYM) (r->r_info)], NULL,
+ (void *) (l_addr + r->r_offset));
+#endif
+ }
+ }
else
_dl_reloc_bad_type (map, r_type, 1);
}
@@ -589,6 +704,20 @@
elf_machine_lazy_rela (struct link_map *map,
Elf32_Addr l_addr, const Elf32_Rela *reloc)
{
+ Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
+ const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
+ if (__builtin_expect (r_type == R_386_JMP_SLOT, 1))
+ ;
+ else if (__builtin_expect (r_type == R_386_TLS_DESC, 1))
+ {
+ struct tlsdesc volatile * __attribute__((__unused__)) td =
+ (struct tlsdesc volatile *)reloc_addr;
+
+ td->arg = (void*)reloc;
+ td->entry = _dl_tlsdesc_resolve_rela;
+ }
+ else
+ _dl_reloc_bad_type (map, r_type, 1);
}
#endif /* !RTLD_BOOTSTRAP */
Modified: trunk/libc/sysdeps/i386/dl-tls.h
==============================================================================
--- trunk/libc/sysdeps/i386/dl-tls.h (original)
+++ trunk/libc/sysdeps/i386/dl-tls.h Thu May 15 05:10:03 2008
@@ -19,7 +19,7 @@
/* Type used for the representation of TLS information in the GOT. */
-typedef struct
+typedef struct dl_tls_index
{
unsigned long int ti_module;
unsigned long int ti_offset;
Modified: trunk/libc/sysdeps/ia64/bits/byteswap.h
==============================================================================
--- trunk/libc/sysdeps/ia64/bits/byteswap.h (original)
+++ trunk/libc/sysdeps/ia64/bits/byteswap.h Thu May 15 05:10:03 2008
@@ -1,5 +1,5 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,2000,2002,2003,2008 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
@@ -17,7 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#if !defined _BYTESWAP_H && !defined _NETINET_IN_H
+#if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H
# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
#endif
Modified: trunk/libc/sysdeps/posix/getaddrinfo.c
==============================================================================
--- trunk/libc/sysdeps/posix/getaddrinfo.c (original)
+++ trunk/libc/sysdeps/posix/getaddrinfo.c Thu May 15 05:10:03 2008
@@ -61,6 +61,7 @@
#include <not-cancel.h>
#include <nscd/nscd-client.h>
#include <nscd/nscd_proto.h>
+#include <resolv/res_hconf.h>
#ifdef HAVE_LIBIDN
extern int __idna_to_ascii_lz (const char *input, char **output, int flags);
@@ -97,8 +98,9 @@
{
int socktype;
int protocol;
- char name[4];
- int protoflag;
+ uint8_t protoflag;
+ bool defaultflag;
+ char name[8];
};
/* Values for `protoflag'. */
@@ -107,11 +109,21 @@
static const struct gaih_typeproto gaih_inet_typeproto[] =
{
- { 0, 0, "", 0 },
- { SOCK_STREAM, IPPROTO_TCP, "tcp", 0 },
- { SOCK_DGRAM, IPPROTO_UDP, "udp", 0 },
- { SOCK_RAW, 0, "raw", GAI_PROTO_PROTOANY|GAI_PROTO_NOSERVICE },
- { 0, 0, "", 0 }
+ { 0, 0, 0, false, "" },
+ { SOCK_STREAM, IPPROTO_TCP, 0, true, "tcp" },
+ { SOCK_DGRAM, IPPROTO_UDP, 0, true, "udp" },
+#if defined SOCK_DCCP && defined IPPROTO_DCCP
+ { SOCK_DCCP, IPPROTO_DCCP, 0, false, "dccp" },
+#endif
+#ifdef IPPROTO_UDPLITE
+ { SOCK_DGRAM, IPPROTO_UDPLITE, 0, false, "udplite" },
+#endif
+#ifdef IPPROTO_SCTP
+ { SOCK_STREAM, IPPROTO_SCTP, 0, false, "sctp" },
+ { SOCK_SEQPACKET, IPPROTO_SCTP, 0, false, "sctp" },
+#endif
+ { SOCK_RAW, 0, GAI_PROTO_PROTOANY|GAI_PROTO_NOSERVICE, true, "raw" },
+ { 0, 0, 0, false, "" }
};
struct gaih
@@ -363,18 +375,19 @@
we know about. */
struct gaih_servtuple **lastp = &st;
for (++tp; tp->name[0]; ++tp)
- {
- struct gaih_servtuple *newp;
-
- newp = __alloca (sizeof (struct gaih_servtuple));
- newp->next = NULL;
- newp->socktype = tp->socktype;
- newp->protocol = tp->protocol;
- newp->port = port;
-
- *lastp = newp;
- lastp = &newp->next;
- }
+ if (tp->defaultflag)
+ {
+ struct gaih_servtuple *newp;
+
+ newp = __alloca (sizeof (struct gaih_servtuple));
+ newp->next = NULL;
+ newp->socktype = tp->socktype;
+ newp->protocol = tp->protocol;
+ newp->port = port;
+
+ *lastp = newp;
+ lastp = &newp->next;
+ }
}
}
@@ -1099,7 +1112,10 @@
{
if (! IN6_IS_ADDR_MULTICAST (&in6->sin6_addr))
{
- if (IN6_IS_ADDR_LINKLOCAL (&in6->sin6_addr))
+ if (IN6_IS_ADDR_LINKLOCAL (&in6->sin6_addr)
+ /* RFC 4291 2.5.3 says that the loopback address is to be
+ treated like a link-local address. */
+ || IN6_IS_ADDR_LOOPBACK (&in6->sin6_addr))
scope = 2;
else if (IN6_IS_ADDR_SITELOCAL (&in6->sin6_addr))
scope = 5;
@@ -1232,20 +1248,14 @@
{
const struct sockaddr_in *in = (const struct sockaddr_in *) in6;
- /* Convert to IPv6 address. */
+ /* Construct a V4-to-6 mapped address. */
in6_mem.sin6_family = PF_INET6;
in6_mem.sin6_port = in->sin_port;
in6_mem.sin6_flowinfo = 0;
- if (in->sin_addr.s_addr == htonl (0x7f000001))
- in6_mem.sin6_addr = (struct in6_addr) IN6ADDR_LOOPBACK_INIT;
- else
- {
- /* Construct a V4-to-6 mapped address. */
- memset (&in6_mem.sin6_addr, '\0', sizeof (in6_mem.sin6_addr));
- in6_mem.sin6_addr.s6_addr16[5] = 0xffff;
- in6_mem.sin6_addr.s6_addr32[3] = in->sin_addr.s_addr;
- in6_mem.sin6_scope_id = 0;
- }
+ memset (&in6_mem.sin6_addr, '\0', sizeof (in6_mem.sin6_addr));
+ in6_mem.sin6_addr.s6_addr16[5] = 0xffff;
+ in6_mem.sin6_addr.s6_addr32[3] = in->sin_addr.s_addr;
+ in6_mem.sin6_scope_id = 0;
in6 = &in6_mem;
}
@@ -2076,6 +2086,10 @@
if ((hints->ai_flags & AI_CANONNAME) && name == NULL)
return EAI_BADFLAGS;
+
+ /* Initialize configurations. */
+ if (__builtin_expect (!_res_hconf.initialized, 0))
+ _res_hconf_init ();
struct in6addrinfo *in6ai = NULL;
size_t in6ailen = 0;
Modified: trunk/libc/sysdeps/s390/bits/byteswap.h
==============================================================================
--- trunk/libc/sysdeps/s390/bits/byteswap.h (original)
+++ trunk/libc/sysdeps/s390/bits/byteswap.h Thu May 15 05:10:03 2008
@@ -1,5 +1,5 @@
/* Macros to swap the order of bytes in integer values. s390 version.
- Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002, 2003, 2008 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@xxxxxxxxxx).
This file is part of the GNU C Library.
@@ -18,7 +18,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#if !defined _BYTESWAP_H && !defined _NETINET_IN_H
+#if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H
# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
#endif
Modified: trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h Thu May 15 05:10:03 2008
@@ -1,5 +1,5 @@
/* System-specific socket constants and types. Linux version.
- Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007
+ Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -52,6 +52,8 @@
SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
datagrams of fixed maximum length. */
#define SOCK_SEQPACKET SOCK_SEQPACKET
+ SOCK_DCCP = 6,
+#define SOCK_DCCP SOCK_DCCP /* Datagram Congestion Control Protocol. */
SOCK_PACKET = 10 /* Linux specific way of getting packets
at the dev level. For writing rarp and
other similar things on the user level. */
Modified: trunk/libc/sysdeps/x86_64/Makefile
==============================================================================
--- trunk/libc/sysdeps/x86_64/Makefile (original)
+++ trunk/libc/sysdeps/x86_64/Makefile Thu May 15 05:10:03 2008
@@ -13,3 +13,13 @@
ifeq ($(subdir),string)
sysdep_routines += cacheinfo
endif
+
+ifeq ($(subdir),elf)
+sysdep-dl-routines += tlsdesc dl-tlsdesc
+sysdep_routines += tlsdesc dl-tlsdesc
+sysdep-rtld-routines += tlsdesc dl-tlsdesc
+endif
+
+ifeq ($(subdir),csu)
+gen-as-const-headers += tlsdesc.sym
+endif
Modified: trunk/libc/sysdeps/x86_64/bits/byteswap.h
==============================================================================
--- trunk/libc/sysdeps/x86_64/bits/byteswap.h (original)
+++ trunk/libc/sysdeps/x86_64/bits/byteswap.h Thu May 15 05:10:03 2008
@@ -1,5 +1,5 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997, 1998, 2000, 2002, 2003, 2007
+ Copyright (C) 1997, 1998, 2000, 2002, 2003, 2007, 2008
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -18,7 +18,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#if !defined _BYTESWAP_H && !defined _NETINET_IN_H
+#if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H
# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
#endif
Modified: trunk/libc/sysdeps/x86_64/bits/linkmap.h
==============================================================================
--- trunk/libc/sysdeps/x86_64/bits/linkmap.h (original)
+++ trunk/libc/sysdeps/x86_64/bits/linkmap.h Thu May 15 05:10:03 2008
@@ -3,6 +3,7 @@
{
Elf64_Addr plt; /* Address of .plt + 0x16 */
Elf64_Addr gotplt; /* Address of .got + 0x18 */
+ void *tlsdesc_table; /* Address of TLS descriptor hash table. */
};
#else
@@ -10,5 +11,6 @@
{
Elf32_Addr plt; /* Address of .plt + 0x16 */
Elf32_Addr gotplt; /* Address of .got + 0x0c */
+ void *tlsdesc_table; /* Address of TLS descriptor hash table. */
};
#endif
Modified: trunk/libc/sysdeps/x86_64/dl-machine.h
==============================================================================
--- trunk/libc/sysdeps/x86_64/dl-machine.h (original)
+++ trunk/libc/sysdeps/x86_64/dl-machine.h Thu May 15 05:10:03 2008
@@ -26,6 +26,7 @@
#include <sys/param.h>
#include <sysdep.h>
#include <tls.h>
+#include <dl-tlsdesc.h>
/* Return nonzero iff ELF header is compatible with the running host. */
static inline int __attribute__ ((unused))
@@ -130,6 +131,10 @@
the offset on the stack, and then jump to the resolved address. */
got[2] = (Elf64_Addr) &_dl_runtime_resolve;
}
+
+ if (l->l_info[ADDRIDX (DT_TLSDESC_GOT)] && lazy)
+ *(Elf64_Addr*)(D_PTR (l, l_info[ADDRIDX (DT_TLSDESC_GOT)]) + l->l_addr)
+ = (Elf64_Addr) &_dl_tlsdesc_resolve_rela;
return lazy;
}
@@ -194,7 +199,9 @@
# define elf_machine_type_class(type) \
((((type) == R_X86_64_JUMP_SLOT \
|| (type) == R_X86_64_DTPMOD64 \
- || (type) == R_X86_64_DTPOFF64 || (type) == R_X86_64_TPOFF64) \
+ || (type) == R_X86_64_DTPOFF64 \
+ || (type) == R_X86_64_TPOFF64 \
+ || (type) == R_X86_64_TLSDESC) \
* ELF_RTYPE_CLASS_PLT) \
| (((type) == R_X86_64_COPY) * ELF_RTYPE_CLASS_COPY))
#else
@@ -323,6 +330,41 @@
*reloc_addr = sym->st_value + reloc->r_addend;
# endif
break;
+ case R_X86_64_TLSDESC:
+ {
+ struct tlsdesc volatile *td =
+ (struct tlsdesc volatile *)reloc_addr;
+
+# ifndef RTLD_BOOTSTRAP
+ if (! sym)
+ {
+ td->arg = (void*)reloc->r_addend;
+ td->entry = _dl_tlsdesc_undefweak;
+ }
+ else
+# endif
+ {
+# ifndef RTLD_BOOTSTRAP
+# ifndef SHARED
+ CHECK_STATIC_TLS (map, sym_map);
+# else
+ if (!TRY_STATIC_TLS (map, sym_map))
+ {
+ td->arg = _dl_make_tlsdesc_dynamic
+ (sym_map, sym->st_value + reloc->r_addend);
+ td->entry = _dl_tlsdesc_dynamic;
+ }
+ else
+# endif
+# endif
+ {
+ td->arg = (void*)(sym->st_value - sym_map->l_tls_offset
+ + reloc->r_addend);
+ td->entry = _dl_tlsdesc_return;
+ }
+ }
+ break;
+ }
case R_X86_64_TPOFF64:
/* The offset is negative, forward from the thread pointer. */
# ifndef RTLD_BOOTSTRAP
@@ -435,6 +477,15 @@
map->l_mach.plt
+ (((Elf64_Addr) reloc_addr) - map->l_mach.gotplt) * 2;
}
+ else if (__builtin_expect (r_type == R_X86_64_TLSDESC, 1))
+ {
+ struct tlsdesc volatile * __attribute__((__unused__)) td =
+ (struct tlsdesc volatile *)reloc_addr;
+
+ td->arg = (void*)reloc;
+ td->entry = (void*)(D_PTR (map, l_info[ADDRIDX (DT_TLSDESC_PLT)])
+ + map->l_addr);
+ }
else
_dl_reloc_bad_type (map, r_type, 1);
}
Modified: trunk/libc/sysdeps/x86_64/dl-tls.h
==============================================================================
--- trunk/libc/sysdeps/x86_64/dl-tls.h (original)
+++ trunk/libc/sysdeps/x86_64/dl-tls.h Thu May 15 05:10:03 2008
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. x86-64 version.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 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
@@ -19,7 +19,7 @@
/* Type used for the representation of TLS information in the GOT. */
-typedef struct
+typedef struct dl_tls_index
{
unsigned long int ti_module;
unsigned long int ti_offset;
Modified: trunk/ports/ChangeLog.hppa
==============================================================================
--- trunk/ports/ChangeLog.hppa (original)
+++ trunk/ports/ChangeLog.hppa Thu May 15 05:10:03 2008
@@ -1,3 +1,9 @@
+2008-05-12 Aurelien Jarno <aurelien@xxxxxxxxxxx>
+
+ [BZ #6506]
+ * sysdeps/hppa/fpu/fesetenv.c: bufptr is always read, temp is
+ read while writing back status word.
+
2008-04-21 Daniel Jacobowitz <dan@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/hppa/bits/shm.h: Fix comment describing
Modified: trunk/ports/sysdeps/hppa/fpu/fesetenv.c
==============================================================================
--- trunk/ports/sysdeps/hppa/fpu/fesetenv.c (original)
+++ trunk/ports/sysdeps/hppa/fpu/fesetenv.c Thu May 15 05:10:03 2008
@@ -35,7 +35,7 @@
bufptr = temp.buf;
__asm__ (
"fstd,ma %%fr0,8(%1)\n"
- : "=m" (temp), "+r" (bufptr) : : "%r0");
+ : "=m" (temp) : "r" (bufptr) : "%r0");
temp.env.__status_word &= ~(FE_ALL_EXCEPT
| (FE_ALL_EXCEPT << 27)
@@ -56,7 +56,7 @@
is loaded last and T-Bit is enabled. */
__asm__ (
"fldd,mb -8(%1),%%fr0\n"
- : "=m" (temp), "+r" (bufptr) : : "%r0" );
+ : : "m" (temp), "r" (bufptr) : "%r0" );
/* Success. */
return 0;