Skip to content

Commit

Permalink
Updated to fedora-glibc-20060328T0900
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Jelinek committed Mar 28, 2006
1 parent 0c20be1 commit 5a6a773
Show file tree
Hide file tree
Showing 58 changed files with 2,018 additions and 855 deletions.
172 changes: 160 additions & 12 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,42 +1,190 @@
2006-03-27 Ulrich Drepper <drepper@redhat.com>

* sysdeps/unix/sysv/linux/kernel-features.h: Remove support for
architectures which moved to ports.

* sysdeps/unix/sysv/linux/kernel-features.h: Add
__ASSUME_SET_ROBUST_LIST.

2006-03-27 Jakub Jelinek <jakub@redhat.com>

* wcsmbs/wchar.h (btowc, wctob): Don't optimize in C++.

2006-03-24 David S. Miller <davem@sunset.davemloft.net>

* sysdeps/sparc/sparc32/bits/atomic.h
(__v9_compare_and_exchange_val_32_acq): Add "memory" clobber.
* sysdeps/sparc/sparc32/sparcv9/bits/atomic.h
(__arch_compare_and_exchange_val_32_acq, atomic_exchange_acq):
Likewise.
* sysdeps/sparc/sparc64/bits/atomic.h
(__arch_compare_and_exchange_val_32_acq,
__arch_compare_and_exchange_val_64_acq, atomic_exchange_acq): Likewise.

2006-03-24 Jakub Jelinek <jakub@redhat.com>

* nis/nss_nisplus/nisplus-proto.c (_nss_create_tablename): Check the
return value of malloc rather than the static var again.
* nis/nss_nisplus/nisplus-grp.c (_nss_create_tablename): Likewise.
* nis/nss_nisplus/nisplus-network.c (_nss_create_tablename): Likewise.
* nis/nss_nisplus/nisplus-ethers.c (_nss_create_tablename): Likewise.
* nis/nss_nisplus/nisplus-rpc.c (_nss_create_tablename): Likewise.
* nis/nss_nisplus/nisplus-service.c (_nss_create_tablename): Likewise.
* nis/nss_nisplus/nisplus-hosts.c (_nss_create_tablename): Likewise.
* nis/nss_nisplus/nisplus-alias.c (_nss_create_tablename): Likewise.
* nis/nss_nisplus/nisplus-pwd.c (_nss_pwd_create_tablename): Likewise.

2006-03-25 Ulrich Drepper <drepper@redhat.com>

* sysdeps/unix/sysv/linux/sparc/bits/poll.h: Add POLLMSG,
POLLREMOVE, and POLLRDHUP.
* sysdeps/unix/sysv/linux/bits/poll.h: Add POLLREMOVE and POLLRDHUP.

2006-03-24 Ulrich Drepper <drepper@redhat.com>

* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Define
LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT.
* sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise.
* sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Likewise.
* sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise.
* sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
* sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise.

2006-03-17 Roland McGrath <roland@redhat.com>

* elf/rtld.c (dl_main): Run final self-relocation after setting up TLS.
From Alexandre Oliva <aoliva@redhat.com>.

* elf/tst-audit2.c: New file.
* elf/Makefile (tests): Add it.
($(objpfx)tst-audit2.out): New target.
(tst-audit2-ENV): New variable.

* elf/tst-leaks1.c: Include <stdio.h>.

2006-03-16 Roland McGrath <roland@redhat.com>

* sysdeps/unix/sysv/linux/alpha/getcontext.S (__getcontext_x):
Use .set noat to quiet assembler warning.

* math/gen-libm-test.pl (parse_args): Take function name for pretty
output as an argument.
(generate_testfile): Pass it the name given in the START macro.

[BZ #2466]
* math/libm-test.inc (llrint_test, llround_test): Fix last change to
protect large-precision cases with [LDBL_MANT_DIG > 100].
(llrint_test_tonearest, llrint_test_towardzero): Likewise.
(llrint_test_downward, llrint_test_upward): Likewise.

2006-03-15 Steven Munroe <sjmunroe@us.ibm.com>
Alan Modra <amodra@bigpond.net.au>

[BZ #2466]
* math/libm-test.inc (llrint_test, llround_test) [TEST_LDOUBLE]:
Add new test values.
(llrint_test_tonearest, llrint_test_towardzero, llrint_test_downward,
llrint_test_upward): New functions.
(main): Call them.

* sysdeps/ieee754/ldbl-128ibm/s_llrintl.c (__llrintl): Handle
rounding that spans doubles in IBM long double format.
* sysdeps/ieee754/ldbl-128ibm/s_llroundl.c (__llroundl): Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_llrintl.S: Removed.
* sysdeps/powerpc/powerpc64/fpu/s_llroundl.S: Removed.
* sysdeps/powerpc/powerpc64/fpu/s_lrintl.S: Removed.
* sysdeps/powerpc/powerpc64/fpu/s_lroundl.S: Removed.

2006-03-16 Roland McGrath <roland@redhat.com>

* wcsmbs/wchar.h (__wcstol_internal, __wcstoul_internal): Declare these
only when we will use them, under [__OPTIMIZE__ && __GNUC__ >= 2].
(__wcstoll_internal, __wcstoull_internal_defined): Likewise.

2006-03-06 Steven Munroe <sjmunroe@us.ibm.com>

* sysdeps/powerpc/powerpc32/fpu/fprsave.S: Add cfi_offset for spilling
of non-volatile floating-point registers to the stack (fp14-fp31).
* sysdeps/powerpc/powerpc32/gprsave0.S: Add cfi_offset for spilling of
non-volatile general-purpose registers to the stack (gpr13-gpr31).
* sysdeps/powerpc/powerpc64/dl-trampoline.S: Add cfi_offset
for non-volatiles gpr30 - grp31 spilled to the stack.
* sysdeps/powerpc/powerpc64/memcpy.S: Add cfi_offset for non-volatile
gpr31 spill to the stack.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S:
Add cfi_offset for non-volatile gpr31 spill to the stack.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Add cfi_offset
for non-volatiles gpr28 - grp31 spilled to the stack.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: Add
cfi_adjust_cfa_offset when a frame is stacked.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S:
(__novec_setcontext) : Add cfi_offset for non-volatile gpr31 spill
add LR saved to the stack. Add cfi_adjust_cfa_offset when frame is
stacked.
(__setcontext) : Add cfi_offset for non-volatile gpr31 spill to
the stack.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S:
(__novec_swapcontext) : Add cfi_offset for non-volatile gpr31 spill
add LR saved to the stack.
(__swapcontext) : Add cfi_offset for non-volatile gpr31 spill add LR
saved to the stack. Add cfi_adjust_cfa_offset when frame is stacked.

2006-03-07 Jakub Jelinek <jakub@redhat.com>

[BZ #2423]
* math/libm-test.inc [TEST_LDOUBLE] (ceil_test, floor_test, rint_test,
round_test, trunc_test): Only run some of the new tests if
LDBL_MANT_DIG > 100.

2006-03-03 Steven Munroe <sjmunroe@us.ibm.com>
Alan Modra <amodra@bigpond.net.au>

[BZ #2423]
* math/libm-test.inc [TEST_LDOUBLE] (ceil_test, floor_test, rint_test,
round_test, trunc_test): Add new tests.

* sysdeps/powerpc/fpu/fenv_libc.h (__fegetround, __fesetround):
Define inline implementations.
* sysdeps/powerpc/fpu/fegetround.c: Use __fegetround.
* sysdeps/powerpc/fpu/fesetround.c: Use __fesetround.

* sysdeps/powerpc/fpu/math_ldbl.h: New file.

[BZ #2423]
* math/libm-test.inc [TEST_LDOUBLE] (ceil_test, floor_test, rint_test,
round_test, trunc_test): Add new tests.
* sysdeps/ieee754/ldbl-128ibm/math_ldbl.h
(EXTRACT_IBM_EXTENDED_MANTISSA, INSERT_IBM_EXTENDED_MANTISSA):
Removed, replaced with.
(EXTRACT_IBM_EXTENDED_MANTISSA, INSERT_IBM_EXTENDED_MANTISSA):
Removed, replaced with ...
(ldbl_extract_mantissa, ldbl_insert_mantissa, ldbl_pack, ldbl_unpack,
ldbl_canonicalise, ldbl_nearbyint): Define inline utility
functions for IBM long double format.
ldbl_canonicalise, ldbl_nearbyint): New functions.
* sysdeps/ieee754/ldbl-128ibm/e_fmodl.c (__ieee754_fmodl): Replace
EXTRACT_IBM_EXTENDED_MANTISSA and INSERT_IBM_EXTENDED_MANTISSA
with ldbl_extract_mantissa and ldbl_insert_mantissa.
* sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c (__ieee754_rem_pio2l):
Replace EXTRACT_IBM_EXTENDED_MANTISSA with ldbl_extract_mantissa.
(ldbl_extract_mantissa, ldbl_insert_mantissa): Defined.

(ldbl_extract_mantissa, ldbl_insert_mantissa): New inline functions.
* sysdeps/ieee754/ldbl-128ibm/s_ceill.c (__ceill): Handle rounding
that spans doubles in IBM long double format.
* sysdeps/ieee754/ldbl-128ibm/s_floorl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_rintl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_roundl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_truncl.c: Likewise.
* sysdeps/powerpc/fpu/math_ldbl.h: New file.
* sysdeps/powerpc/powerpc64/fpu/s_rintl.S: Removed.
* sysdeps/powerpc/powerpc64/fpu/s_rintl.S: File removed.

2004-12-09 Randolph Chung <tausq@debian.org>

* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_UTIMES): Don't
define for hppa, which doesn't support this syscall.

2006-03-13 Jakub Jelinek <jakub@redhat.com>

[BZ #2451]
* elf/dl-load.c (open_verify): Add free_name argument, if true, free
name before calling lose.
(open_path): Adjust caller.
(_dl_map_object): Adjust callers. Free name_copy before calling
_dl_signal_error.
* elf/Makefile: Add rules to build and run tst-leaks1.
* elf/tst-leaks1.c: New test.

2006-03-06 Roland McGrath <roland@redhat.com>

Expand Down
17 changes: 14 additions & 3 deletions elf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ distribute := rtld-Rules \
order2mod1.c order2mod2.c order2mod3.c order2mod4.c \
tst-stackguard1.c tst-stackguard1-static.c \
tst-array5.c tst-array5-static.c tst-array5dep.c \
tst-array5.exp
tst-array5.exp tst-leaks1.c

CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-dl-lookup.c = -fexceptions -fasynchronous-unwind-tables
Expand Down Expand Up @@ -139,7 +139,7 @@ vpath %.c ../locale/programs
endif
endif

tests = tst-tls1 tst-tls2 tst-tls9
tests = tst-tls1 tst-tls2 tst-tls9 tst-leaks1
ifeq (yes,$(have-initfini-array))
tests += tst-array1 tst-array2 tst-array3 tst-array4 tst-array5
endif
Expand Down Expand Up @@ -168,7 +168,8 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
tst-align tst-align2 $(tests-execstack-$(have-z-execstack)) \
tst-dlmodcount tst-dlopenrpath tst-deep1 \
tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \
unload3 unload4 unload5 unload6 tst-audit1 tst-global1 order2 \
unload3 unload4 unload5 unload6 tst-global1 order2 \
tst-audit1 tst-audit2 \
tst-stackguard1
# reldep9
test-srcs = tst-pathopt
Expand All @@ -180,6 +181,7 @@ endif
ifeq (yesyes,$(have-fpie)$(build-shared))
tests: $(objpfx)tst-pie1.out
endif
tests: $(objpfx)tst-leaks1-mem
modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
testobj1_1 failobj constload2 constload3 unloadmod \
dep1 dep2 dep3 dep4 $(modules-vis-$(have-protected)) \
Expand Down Expand Up @@ -878,6 +880,9 @@ $(objpfx)tst-dlmopen3.out: $(objpfx)tst-dlmopen1mod.so
$(objpfx)tst-audit1.out: $(objpfx)tst-auditmod1.so
tst-audit1-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so

$(objpfx)tst-audit2.out: $(objpfx)tst-auditmod1.so
tst-audit2-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so

$(objpfx)tst-global1: $(libdl)
$(objpfx)tst-global1.out: $(objpfx)testobj6.so $(objpfx)testobj2.so

Expand All @@ -895,3 +900,9 @@ order2mod2.so-no-z-defs = yes

tst-stackguard1-ARGS = --command "$(built-program-cmd) --child"
tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child"

$(objpfx)tst-leaks1: $(libdl)
$(objpfx)tst-leaks1-mem: $(objpfx)tst-leaks1.out
$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks1.mtrace > $@

tst-leaks1-ENV = MALLOC_TRACE=$(objpfx)tst-leaks1.mtrace
25 changes: 18 additions & 7 deletions elf/dl-load.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* Map in a shared object's segments from the file.
Copyright (C) 1995-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006 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 @@ -1554,7 +1555,7 @@ print_search_path (struct r_search_path_elem **list,
user might want to know about this. */
static int
open_verify (const char *name, struct filebuf *fbp, struct link_map *loader,
int whatcode, bool *found_other_class)
int whatcode, bool *found_other_class, bool free_name)
{
/* This is the expected ELF header. */
#define ELF32_CLASS ELFCLASS32
Expand Down Expand Up @@ -1635,6 +1636,12 @@ open_verify (const char *name, struct filebuf *fbp, struct link_map *loader,
errstring = (errval == 0
? N_("file too short") : N_("cannot read file data"));
call_lose:
if (free_name)
{
char *realname = (char *) name;
name = strdupa (realname);
free (realname);
}
lose (errval, fd, name, NULL, NULL, errstring);
}

Expand Down Expand Up @@ -1821,7 +1828,8 @@ open_path (const char *name, size_t namelen, int preloaded,
if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS, 0))
_dl_debug_printf (" trying file=%s\n", buf);

fd = open_verify (buf, fbp, loader, whatcode, found_other_class);
fd = open_verify (buf, fbp, loader, whatcode, found_other_class,
false);
if (this_dir->status[cnt] == unknown)
{
if (fd != -1)
Expand Down Expand Up @@ -2098,7 +2106,7 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
{
fd = open_verify (cached,
&fb, loader ?: GL(dl_ns)[nsid]._ns_loaded,
LA_SER_CONFIG, &found_other_class);
LA_SER_CONFIG, &found_other_class, false);
if (__builtin_expect (fd != -1, 1))
{
realname = local_strdup (cached);
Expand Down Expand Up @@ -2136,7 +2144,7 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
{
fd = open_verify (realname, &fb,
loader ?: GL(dl_ns)[nsid]._ns_loaded, 0,
&found_other_class);
&found_other_class, true);
if (__builtin_expect (fd, 0) == -1)
free (realname);
}
Expand Down Expand Up @@ -2166,8 +2174,11 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
if ((name_copy = local_strdup (name)) == NULL
|| (l = _dl_new_object (name_copy, name, type, loader,
mode, nsid)) == NULL)
_dl_signal_error (ENOMEM, name, NULL,
N_("cannot create shared object descriptor"));
{
free (name_copy);
_dl_signal_error (ENOMEM, name, NULL,
N_("cannot create shared object descriptor"));
}
/* Signal that this is a faked entry. */
l->l_faked = 1;
/* Since the descriptor is initialized with zero we do not
Expand Down
40 changes: 25 additions & 15 deletions elf/rtld.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Run time dynamic linker.
Copyright (C) 1995-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Copyright (C) 1995-2002, 2003, 2004, 2005, 2006 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 @@ -2200,7 +2200,6 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
#ifndef HP_TIMING_NONAVAIL
hp_timing_t start;
hp_timing_t stop;
hp_timing_t add;
#endif

/* If we are profiling we also must do lazy reloaction. */
Expand Down Expand Up @@ -2255,19 +2254,6 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
if (__builtin_expect (GL(dl_profile_map) != NULL, 0))
/* We must prepare the profiling. */
_dl_start_profile ();

if (rtld_multiple_ref)
{
/* There was an explicit ref to the dynamic linker as a shared lib.
Re-relocate ourselves with user-controlled symbol definitions. */
HP_TIMING_NOW (start);
/* Mark the link map as not yet relocated again. */
GL(dl_rtld_map).l_relocated = 0;
_dl_relocate_object (&GL(dl_rtld_map), main_map->l_scope, 0, 0);
HP_TIMING_NOW (stop);
HP_TIMING_DIFF (add, start, stop);
HP_TIMING_ACCUM_NT (relocate_time, add);
}
}

#ifndef NONTLS_INIT_TP
Expand Down Expand Up @@ -2296,6 +2282,30 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
NONTLS_INIT_TP;
#endif

if (! prelinked && rtld_multiple_ref)
{
/* There was an explicit ref to the dynamic linker as a shared lib.
Re-relocate ourselves with user-controlled symbol definitions.
We must do this after TLS initialization in case after this
re-relocation, we might call a user-supplied function
(e.g. calloc from _dl_relocate_object) that uses TLS data. */

#ifndef HP_TIMING_NONAVAIL
hp_timing_t start;
hp_timing_t stop;
hp_timing_t add;
#endif

HP_TIMING_NOW (start);
/* Mark the link map as not yet relocated again. */
GL(dl_rtld_map).l_relocated = 0;
_dl_relocate_object (&GL(dl_rtld_map), main_map->l_scope, 0, 0);
HP_TIMING_NOW (stop);
HP_TIMING_DIFF (add, start, stop);
HP_TIMING_ACCUM_NT (relocate_time, add);
}

#ifdef SHARED
/* Auditing checkpoint: we have added all objects. */
if (__builtin_expect (GLRO(dl_naudit) > 0, 0))
Expand Down
Loading

0 comments on commit 5a6a773

Please sign in to comment.