Skip to content

Commit

Permalink
Merge remote branch 'origin/master' into fedora/master
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Schwab committed Jan 4, 2010
2 parents 600f972 + c10f886 commit 16a7541
Show file tree
Hide file tree
Showing 22 changed files with 413 additions and 78 deletions.
56 changes: 56 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,59 @@
2009-12-15 Maciej W. Rozycki <macro@codesourcery.com>

[BZ #11115]
* stdlib/tst-makecontext3.c: New file.
* stdlib/Makefile (tests): Add new test.

* stdlib/tst-setcontext.c (check_called): Fix a typo.

2009-12-17 H.J. Lu <hongjiu.lu@intel.com>

* configure.in: Enable multi-arch by default if the assembler
supports gnu_indirect_function symbol type and the architecture
supports it.

2009-12-23 Ulrich Drepper <drepper@redhat.com>

* include/stdlib.h: Exclude some includes and prototypes if _ISOMAC
is defined.

2009-12-22 Samuel Thibault <samuel.thibault@ens-lyon.org>

* hurd/hurdioctl.c (_hurd_locked_install_cttyid): Set newctty to
MACH_PORT_NULL when id != cttyid.

2009-12-20 Samuel Thibault <samuel.thibault@ens-lyon.org>

* sysdeps/mach/hurd/getcwd.c (cleanup): Do not call
__mach_port_deallocate on rootdevid.

2009-12-17 Martin Schwidefsky <schwidefsky@de.ibm.com>

* sysdeps/s390/s390-32/dl-machine.h (elf_machine_rela): Handle
R_390_PC32DBL. Remove unneeded R_390_PLT16DBL.
* sysdeps/s390/s390-32/dl-machine.h (elf_machine_rela): Remove
unneeded R_390_PLT16DBL and R_390_PLT32DBL.

2009-12-21 Ulrich Drepper <drepper@redhat.com>

[BZ #10992]
* sysdeps/unix/sysv/linux/futimens.c: Handle AT_FDCWD.
Patch by Eric Blake <ebb9@byu.net>.

2009-12-15 Ulrich Drepper <drepper@redhat.com>

[BZ #11093]
* bits/poll.h: Define POLLRDNORM, POLLRDBAND, POLLWRNORM, and
POLLWRBAND also for POSIX 2008.
* sysdeps/unix/sysv/linux/bits/poll.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/poll.h: Likewise.

* include/link.h (struct link_map): Move l_used into its own word.
* elf/dl-lookup.c (_dl_lookup_symbol_x): Only update l_used when it is
still zero.
* elf/dl-object.c (_dl_new_object): Set dl_used if we know it is
never really used.

2009-12-13 H.J. Lu <hongjiu.lu@intel.com>

* sysdeps/i386/i686/multiarch/strcspn.S Include <init-arch.h>
Expand Down
6 changes: 3 additions & 3 deletions bits/poll.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 1997, 2000, 2001 Free Software Foundation, Inc.
/* Copyright (C) 1997, 2000, 2001, 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
Expand Down Expand Up @@ -27,8 +27,8 @@
#define POLLPRI 02 /* There is urgent data to read. */
#define POLLOUT 04 /* Writing now will not block. */

#ifdef __USE_XOPEN
/* These values are defined in XPG4.2. */
#if defined __USE_XOPEN || defined __USE_XOPEN2K8
/* These values are defined in XPG4.2 and later. */
# define POLLRDNORM POLLIN /* Normal data may be read. */
# define POLLRDBAND POLLPRI /* Priority data may be read. */
# define POLLWRNORM POLLOUT /* Writing now will not block. */
Expand Down
49 changes: 41 additions & 8 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -724,12 +724,12 @@ INSTALL_PROGRAM
sysdeps_add_ons
sysnames
submachine
multi_arch
base_machine
add_on_subdirs
add_ons
libc_cv_nss_crypt
experimental_malloc
multi_arch
all_warnings
force_install
bindnow
Expand Down Expand Up @@ -3801,18 +3801,13 @@ fi
if test "${enable_multi_arch+set}" = set; then
enableval=$enable_multi_arch; multi_arch=$enableval
else
multi_arch=no
multi_arch=default
fi
if test x"$multi_arch" = xyes; then
cat >>confdefs.h <<\_ACEOF
#define USE_MULTIARCH 1
_ACEOF
if test x"$multi_arch" != xno; then
multi_arch_d=/multiarch
fi
# Check whether --enable-experimental-malloc was given.
if test "${enable_experimental_malloc+set}" = set; then
enableval=$enable_experimental_malloc; experimental_malloc=$enableval
Expand Down Expand Up @@ -4359,6 +4354,44 @@ for b in $base ''; do
done
done
# If the assembler supports gnu_indirect_function symbol type and the
# architecture supports multi-arch, we enable multi-arch by default.
if test "$multi_arch" = default; then
{ $as_echo "$as_me:$LINENO: checking for assembler gnu_indirect_function symbol type support" >&5
$as_echo_n "checking for assembler gnu_indirect_function symbol type support... " >&6; }
if test "${libc_cv_asm_gnu_indirect_function+set}" = set; then
$as_echo_n "(cached) " >&6
else
cat > conftest.s <<EOF
.type foo,%gnu_indirect_function
EOF
if ${CC-cc} -c $ASFLAGS conftest.s 1>&5 2>&5;
then
libc_cv_asm_gnu_indirect_function=yes
else
libc_cv_asm_gnu_indirect_function=no
fi
rm -f conftest*
fi
{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_gnu_indirect_function" >&5
$as_echo "$libc_cv_asm_gnu_indirect_function" >&6; }
multi_arch=no
if test "$libc_cv_asm_gnu_indirect_function" = yes; then
case $sysnames_add_ons$sysnames in
*"$multi_arch_d"*)
multi_arch=yes
;;
esac
fi
fi
if test x"$multi_arch" = xyes; then
cat >>confdefs.h <<\_ACEOF
#define USE_MULTIARCH 1
_ACEOF
fi
if test -z "$os_used" && test "$os" != none; then
{ { $as_echo "$as_me:$LINENO: error: Operating system $os is not supported." >&5
$as_echo "$as_me: error: Operating system $os is not supported." >&2;}
Expand Down
35 changes: 31 additions & 4 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,10 @@ AC_ARG_ENABLE([multi-arch],
AC_HELP_STRING([--enable-multi-arch],
[enable single DSO with optimizations for multiple architectures]),
[multi_arch=$enableval],
[multi_arch=no])
if test x"$multi_arch" = xyes; then
AC_DEFINE(USE_MULTIARCH)
[multi_arch=default])
if test x"$multi_arch" != xno; then
multi_arch_d=/multiarch
fi
AC_SUBST(multi_arch)

AC_ARG_ENABLE([experimental-malloc],
AC_HELP_STRING([--enable-experimental-malloc],
Expand Down Expand Up @@ -722,6 +720,35 @@ for b in $base ''; do
done
done

# If the assembler supports gnu_indirect_function symbol type and the
# architecture supports multi-arch, we enable multi-arch by default.
if test "$multi_arch" = default; then
AC_CACHE_CHECK([for assembler gnu_indirect_function symbol type support],
libc_cv_asm_gnu_indirect_function, [dnl
cat > conftest.s <<EOF
.type foo,%gnu_indirect_function
EOF
if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
then
libc_cv_asm_gnu_indirect_function=yes
else
libc_cv_asm_gnu_indirect_function=no
fi
rm -f conftest*])
multi_arch=no
if test "$libc_cv_asm_gnu_indirect_function" = yes; then
case $sysnames_add_ons$sysnames in
*"$multi_arch_d"*)
multi_arch=yes
;;
esac
fi
fi
if test x"$multi_arch" = xyes; then
AC_DEFINE(USE_MULTIARCH)
fi
AC_SUBST(multi_arch)

if test -z "$os_used" && test "$os" != none; then
AC_MSG_ERROR(Operating system $os is not supported.)
fi
Expand Down
7 changes: 4 additions & 3 deletions elf/dl-lookup.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,
if (__builtin_expect (protected != 0, 0))
{
/* It is very tricky. We need to figure out what value to
return for the protected symbol. */
return for the protected symbol. */
if (type_class == ELF_RTYPE_CLASS_PLT)
{
if (current_value.s != NULL && current_value.m != undef_map)
Expand Down Expand Up @@ -822,7 +822,8 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,
version, type_class, flags, skip_map);

/* The object is used. */
current_value.m->l_used = 1;
if (__builtin_expect (current_value.m->l_used == 0, 0))
current_value.m->l_used = 1;

if (__builtin_expect (GLRO(dl_debug_mask)
& (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
Expand All @@ -844,7 +845,7 @@ _dl_setup_hash (struct link_map *map)
Elf_Symndx nchain;

if (__builtin_expect (map->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM
+ DT_THISPROCNUM + DT_VERSIONTAGNUM
+ DT_THISPROCNUM + DT_VERSIONTAGNUM
+ DT_EXTRANUM + DT_VALNUM] != NULL, 1))
{
Elf32_Word *hash32
Expand Down
8 changes: 6 additions & 2 deletions elf/dl-object.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Storage management for the chain of loaded shared objects.
Copyright (C) 1995-2002,2004,2006,2007,2008 Free Software Foundation, Inc.
Copyright (C) 1995-2002,2004,2006-2008,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
Expand Down Expand Up @@ -67,6 +67,10 @@ _dl_new_object (char *realname, const char *libname, int type,

new->l_name = realname;
new->l_type = type;
/* If we set the bit now since we know it is never used we avoid
dirtying the cache line later. */
if ((GLRO(dl_debug_mask) & DL_DEBUG_UNUSED) == 0)
new->l_used = 1;
new->l_loader = loader;
#if NO_TLS_OFFSET != 0
new->l_tls_offset = NO_TLS_OFFSET;
Expand Down Expand Up @@ -174,7 +178,7 @@ _dl_new_object (char *realname, const char *libname, int type,
if (result == NULL)
{
/* We were not able to determine the current directory.
Note that free(origin) is OK if origin == NULL. */
Note that free(origin) is OK if origin == NULL. */
free (origin);
origin = (char *) -1;
goto out;
Expand Down
24 changes: 10 additions & 14 deletions hurd/hurdioctl.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* ioctl commands which must be done in the C library.
Copyright (C) 1994,95,96,97,99,2001,02 Free Software Foundation, Inc.
Copyright (C) 1994,95,96,97,99,2001,2002,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
Expand Down Expand Up @@ -169,33 +170,28 @@ _hurd_locked_install_cttyid (mach_port_t cttyid)
for (i = 0; i < _hurd_dtablesize; ++i)
{
struct hurd_fd *const d = _hurd_dtable[i];
mach_port_t newctty;
mach_port_t newctty = MACH_PORT_NULL;

if (d == NULL)
/* Nothing to do for an unused descriptor cell. */
continue;

if (cttyid == MACH_PORT_NULL)
/* We now have no controlling tty at all. */
newctty = MACH_PORT_NULL;
else
if (cttyid != MACH_PORT_NULL)
/* We do have some controlling tty. */
HURD_PORT_USE (&d->port,
({ mach_port_t id;
/* Get the io object's cttyid port. */
if (! __term_getctty (port, &id))
{
if (id == cttyid && /* Is it ours? */
if (id == cttyid /* Is it ours? */
/* Get the ctty io port. */
__term_open_ctty (port,
_hurd_pid, _hurd_pgrp,
&newctty))
&& __term_open_ctty (port,
_hurd_pid, _hurd_pgrp,
&newctty))
/* XXX it is our ctty but the call failed? */
newctty = MACH_PORT_NULL;
__mach_port_deallocate
(__mach_task_self (), (mach_port_t) id);
__mach_port_deallocate (__mach_task_self (), id);
}
else
newctty = MACH_PORT_NULL;
0;
}));

Expand Down
8 changes: 5 additions & 3 deletions include/link.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Data structure for communication from the run-time dynamic linker for
loaded ELF shared objects.
Copyright (C) 1995-2006, 2007 Free Software Foundation, Inc.
Copyright (C) 1995-2006, 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
Expand Down Expand Up @@ -180,7 +180,6 @@ struct link_map
unsigned int l_need_tls_init:1; /* Nonzero if GL(dl_init_static_tls)
should be called on this link map
when relocation finishes. */
unsigned int l_used:1; /* Nonzero if the DSO is used. */
unsigned int l_auditing:1; /* Nonzero if the DSO is used in auditing. */
unsigned int l_audit_any_plt:1; /* Nonzero if at least one audit module
is interested in the PLT interception.*/
Expand Down Expand Up @@ -239,12 +238,15 @@ struct link_map
struct link_map **l_initfini;

/* List of the dependencies introduced through symbol binding. */
unsigned int l_reldepsmax;
struct link_map_reldeps
{
unsigned int act;
struct link_map *list[];
} *l_reldeps;
unsigned int l_reldepsmax;

/* Nonzero if the DSO is used. */
unsigned int l_used;

/* Various flag words. */
ElfW(Word) l_feature_1;
Expand Down
6 changes: 5 additions & 1 deletion include/stdlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

/* Now define the internal interfaces. */
#ifndef __Need_M_And_C
# include <sys/stat.h>
# ifndef _ISOMAC
# include <sys/stat.h>
# endif

__BEGIN_DECLS

Expand Down Expand Up @@ -78,8 +80,10 @@ extern int __clearenv (void);
extern char *__canonicalize_file_name (__const char *__name);
extern char *__realpath (__const char *__name, char *__resolved);
extern int __ptsname_r (int __fd, char *__buf, size_t __buflen);
# ifndef _ISOMAC
extern int __ptsname_internal (int fd, char *buf, size_t buflen,
struct stat64 *stp);
# endif
extern int __getpt (void);
extern int __posix_openpt (int __oflag);

Expand Down
11 changes: 11 additions & 0 deletions nptl/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
2009-12-18 Thomas Schwinge <thomas@codesourcery.com>

* sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
call __gmon_start__.
* sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.

2009-12-17 Ulrich Drepper <drepper@redhat.com>

* pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
using memset.

2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>

* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
Expand Down
Loading

0 comments on commit 16a7541

Please sign in to comment.