constraint to permit non-constant BIT argument.
(atomic_bit_test_set): Likewise.
* sysdeps/x86_64/bits/atomic.h (atomic_bit_test_set): Likewise.
(atomic_bit_set): Likewise. Use 1UL in case that BIT might be >= 32.
For quadword case, use "i" constraint if __builtin_constant_p and < 32
or "r" constraint otherwise.
* configure.in: Move AC_PROG_CC and other program-finding before all
the version checks.
* configure: Regenerated.
(__arch_compare_and_exchange_val_64_acq): Rewrite abort-calling
version of the macro to avoid compile-time warnings.
[! __PIC__] (__arch_compare_and_exchange_64_acq): Rename to above.
(__arch_compare_and_exchange_bool_64_acq): New macro.
(atomic_exchange_and_add, atomic_add): Fix name and usage of it.
(atomic_increment, atomic_decrement): Likewise.
variable. Remove superfluous memory clobber.
* include/atomic.h: Syntax braino fix.
* posix/tst-nice.c (do_test): Use %m formats instead of printing errno
in decimal. Don't bail if niced at start. Just check that nice call
bumps the total at all.
2003-03-20 Alexandre Oliva <aoliva@redhat.com>
* sysdeps/mips/bits/setjmp.h: Store all N32 and N64 registers,
including pc, gp, sp and fp, as long long.
* sysdeps/mips/mips64/setjmp.S: Pass gp to __sigsetjmp_aux.
* sysdeps/mips/mips64/setjmp_aux.c: Adjust type of arguments.
Add gp argument, and set gp in the jmpbuf to it.
* sysdeps/mips/setjmp_aux.c: Revert to o32-only.
2003-03-20 Alexandre Oliva <aoliva@redhat.com>
* sysdeps/mips/dl-machine.h (ELF_MIPS_GNU_GOT1_MASK): Define
properly for n64.
(elf_machine_runtime_setup): Cast link_map pointer to Elf Addr
type.
(elf_machine_rel, elf_machine_rel_relative): Cast symidx to Elf
Word before comparing with gotsym. Take reloc_addr argument as
void*. Remove the code added for the compiler to drop any
alignment assumptions.
* stdlib/strtod.c (INTERNAL): While eating trailing zeros handling
hexdigits correctly. Reported by Fred Tydeman <tydeman@tybor.com>.
* stdlib/tst-strtod.c: Add test for the bug.
2003-03-19 Alexandre Oliva <aoliva@redhat.com>
* sysdeps/mips/ieee754.h: New file, suitable to replace both
../ieee754/ieee754.h and ../ieee754/ldbl-128/ieee754.h, kept
mips-specific for now.
* sysdeps/mips/mips64/Implies: Move wordsize-64 to...
* sysdeps/mips/mips64/n64/Implies: New file.
* sysdeps/mips/mips64/n64/Makefile: New file.
* sysdeps/mips/mips64/n64/el/bits/endian.h: New file.
* sysdeps/mips/mips64/n32/Implies: New file.
* sysdeps/mips/mips64/n32/Makefile: New file.
* sysdeps/mips/mips64/n32/el/bits/endian.h: New file.
* sysdeps/unix/mips/mips64/n32/sysdep.h: New file.
* sysdeps/unix/mips/mips64/n64/sysdep.h: New file.
* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: New file.
* sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c: New file.
* sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: New file.
* sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h: New file.
* sysdeps/unix/sysv/linux/mips/mips64/llseek.c: New file.
* sysdeps/unix/sysv/linux/mips/mips64/recv.c: New file.
* sysdeps/unix/sysv/linux/mips/mips64/send.c: New file.
* sysdeps/unix/sysv/linux/mips/mips64/syscall.S: New file.
* sysdeps/unix/sysv/linux/mips/mips64/syscalls.list: New file.
* sysdeps/unix/sysv/linux/mips/mips64/umount.c: New file.
* sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S: New file.
* sysdeps/unix/sysv/linux/configure.in (libc_cv_slibdir): Use
lib64 for mips64/n64 and lib32 for mips64/n32.
(ldd_rewrite_script): Needed for all mips64 configurations.
* sysdeps/unix/sysv/linux/configure: Rebuilt.
* sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed: New file.
* sysdeps/unix/sysv/linux/mips/mips64/Dist: New file.
2003-03-16 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/clock_settime.c (HANDLE_REALTIME): Define tv here,
not at function level.
* sysdeps/unix/clock_gettime.c (HANDLE_REALTIME): Likewise.
* nscd/nscd_getpw_r.c (nscd_getpw_r): Likewise.
* gmon/gmon.c (write_call_graph): Use u_long for FROM_LEN.
* nscd/nscd_getgr_r.c (nscd_getgr_r): Use nscd_ssize_t for CNT.
(LIBC_START_MAIN, LIBC_START_MAIN_AUXVEC_ARG, MAIN_AUXVEC_ARG)
(INIT_MAIN_ARGS): Define, and #include <sysdeps/generic/libc-start.c>.
(__libc_start_main): Just call the generic one for most of the work.
* sysdeps/generic/libc-start.c [LIBC_START_MAIN]: If defined, define a
static function by that name instead of BP_SYM (__libc_start_main).
[LIBC_START_MAIN_AUXVEC_ARG]: Take AUXVEC as argument.
[MAIN_AUXVEC_ARG]: Pass 4th argument to MAIN.
[INIT_MAIN_ARGS]: Give INIT the same args as MAIN.
* sysdeps/generic/dl-sysdep.c (_dl_sysdep_start) [DL_PLATFORM_AUXV]:
Use this macro for extra AT_* cases.
* sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c (DL_PLATFORM_AUXV):
New macro, guts from ...
(__aux_init_cache): ... here, function removed.
(DL_PLATFORM_INIT): Don't define this.
* sysdeps/powerpc/powerpc32/memset.S: Put __cache_line_size in bss.
* sysdeps/powerpc/powerpc64/memset.S: Likewise.
* Versions.def (libthread_db): Add GLICB_2.3.3 set.
* sysdeps/mips/dl-machine.h: Include sys/asm.h.
(elf_machine_matches_host): Prevent linking of o32 and n32
together.
(elf_machine_dynamic): Document assumption on $gp.
(STRINGXP, STRINGXV, STRINGV_): New macros.
(elf_machine_load_address): Use them to stringize PTR_LA and
PTR_SUBU.
(ELF_DL_FRAME_SIZE, ELF_DL_SAVE_ARG_REGS,
ELF_DL_RESTORE_ARG_REGS, IFABIO32): New macros used in...
(_dl_runtime_resolve): Adjust it for all 3 ABIs.
(__dl_runtime_resolve): Cast the symtab initializer to the
right type.
(RTLD_START): Use it. Adjust it for all 3 ABIs.
(elf_machine_rel): Mark as always_inline in RTLD_BOOTSTRAP.
Handle 64-bit R_MIPS_REL composite relocation and accept
R_MIPS_64 relocations to shift addend size to 64 bits.
Document assumption regarding local GOT entries. Document
backward-compatibility departing from the ABI behavior in
applying relocations that reference section symbols, no longer
used. Support relocations to mis-aligned offsets.
* sysdeps/mips/mips64/dl-machine.h: Deleted, obsolete.
* sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
(_KERNEL_NSIG_BPW): Define in terms of _MIPS_SZLONG.
* sysdeps/unix/sysv/linux/mips/sigaction.c: Define restore and
restore_rt functions. Use them.
* include/gmp.h: Include/gmp-mparam.h.
* stdlib/strtod.c: Include gmp-mparam.h before gmp.h and
gmp-impl.h.
2003-03-14 Alexandre Oliva <aoliva@redhat.com>
* sysdeps/mips/memcpy.S: Map t0-3 to a4-7 on new abis.
* sysdeps/mips/memset.S: Likewise.
* sysdeps/mips/sys/regdef.h: Alias a4-7 or t0-3 to $8-11
depending on the ABI.
2003-03-14 Alexandre Oliva <aoliva@redhat.com>
* sysdeps/mips/atomicity.h (exchange_and_add, atomic_add):
Don't .set mips2 on new abi.
(compare_and_swap): Likewise. Support 64-bit longs on n64.
2003-03-14 Alexandre Oliva <aoliva@redhat.com>
2003-03-13 Guido Guenther <agx@sigxcpu.org>
* sysdeps/unix/sysv/linux/mips/clone.S: introduce and use local
label .Lthread_start since current binutils don't allow branches
to globally visible symbols.
2003-03-13 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/ia64/sysdep.h (BREAK_INSN_1, BREAK_INSN,
ASM_OUTARGS_0, ASM_OUTARGS_1, ASM_OUTARGS_2, ASM_OUTARGS_3,
ASM_OUTARGS_4, ASM_OUTARGS_5, ASM_OUTARGS_6): Define.
(INTERNAL_SYSCALL, INLINE_SYSCALL): Use it. Make syscall arguments
clobbered by the syscall.
(ASM_ARGS_1, ASM_ARGS_2, ASM_ARGS_3, ASM_ARGS_4, ASM_ARGS_5,
ASM_ARGS_6): Change constraints from r to index of corresponding
output register.
* sysdeps/unix/sysv/linux/ia64/clone2.S (__clone2): Swap
ptid and ctid to match kernel.
* sysdeps/unix/sysv/linux/ia64/system.c (FORK): Likewise.
* sysdeps/powerpc/powerpc64/elf/configure.in: Remove
* sysdeps/powerpc/powerpc64/elf/configure: Regenerated.
Check SYM_MAP rather than SYM as definedness check.
Handle R_PPC64_ADDR32, R_PPC64_ADDR30, and R_PPC64_REL64 relocs.
Don't handle R_PPC64_REL24 reloc.
Mostly from Steven Munroe <sjmunroe@us.ibm.com>.
* sysdeps/powerpc/powerpc64/dl-machine.h
[USE_TLS] (elf_machine_type_class): Match all the TLS relocs in a
block, so we cover all the TPREL16* flavors without 6 ||s.
[USE_TLS] (elf_machine_tprel): New function.
(elf_machine_rela) [USE_TLS]: Use elf_machine_tprel for TPREL64 reloc,
and handle TPREL16 relocs too. Return rather than break for DTPREL64.
Mostly from Steven Munroe <sjmunroe@us.ibm.com>.
2003-03-11 Ralf Baechle <ralf@linux-mips.org>
* sysdeps/unix/sysv/linux/mips/clone.S (__thread_start): Use jal
instead of jalr to invoke subroutine so restoring the $gp register
will work properly.
2003-03-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (__NR_pread64): Define
to __NR_pread if not defined.
(__NR_pwrite64): Define to __NR_pwrite if not defined.
* sysdeps/unix/sysv/linux/ia64/system.c: New file.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_CLONE_THREAD_FLAGS): Define for IA-64 and s390* with
kernel >= 2.5.64.
2003-03-11 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Don't clobber R7.
allocate space even for the trailing '/'.
Reported by John Reiser <jreiser@BitWagon.com>.
* sysdeps/unix/sysv/linux/ia64/sysdep.h (LOAD_ARGS_6, ASM_ARGS_6,
ASM_CLOBBERS_6): Define.
(ASM_CLOBBERS_5): Use ASM_CLOBBERS_6.
* sysdeps/unix/sysv/linux/ia64/clone2.S (__clone2): Reorder arguments
to match IA-32 order.
* sysdeps/unix/sysv/linux/i386/clone.S: Fix comment.
assembler command.
* sysdeps/unix/Makefile (compile-syscall): New variable.
Pass -g0 to compiler for assembling syscall stubs from stdin.
* sysdeps/i386/sysdep.h [HAVE_CPP_ASM_DEBUGINFO]
(STABS_CURRENT_FILE, STABS_CURRENT_FILE1, STABS_FUN, STABS_FUN_END):
Define these to do nothing.
* configure.in: New check for -g on .S files.
* configure: Regenerated.
* config.make.in (have-cpp-asm-debuginfo): New variable.
* config.h.in (HAVE_CPP_ASM_DEBUGINFO): New #undef.
* Makeconfig (ASFLAGS): New variable, if undefined and
$(have-cpp-asm-debuginfo), take options matching -g% from $(CFLAGS).
* Makerules (compile.S, COMPILE.S): Use $(ASFLAGS).
(elf_machine_rela): Always use RESOLVE_MAP, needed for
R_PPC64_JMP_SLOT as well as TLS cases.
(BIT_INSERT): Move parenthesis where it ought to have been.
Reported by Steven Munroe <sjmunroe@us.ibm.com>.
* elf/dl-load.c (_dl_map_object_from_fd): Determine whether there
are holes between the segments. Only call mprotect to set
proection to PROT_NONE if there are some.
* elf/dl-load.c (struct filebuf): Actually use FILEBUF_SIZE.
Update comment.
2003-03-03 Ian Wienand <ianw@gelato.unsw.edu.au>
* sysdeps/unix/sysv/linux/ia64/clone2.S: Update to take extra clone
flags.
* include/sched.h: Update clone2 prototype.
2003-03-03 Andreas Jaeger <aj@suse.de>
* math/tgmath.h (__TGMATH_UNARY_REAL_RET_ONLY): New definition.
(llrint): Use it to correct return type.
(lrint): Likewise.
(lround): Likewise.
(llround): Likewise.
* po/gl.po: Likewise.
* scripts/merge-abilist.awk: Restore hack to elide pattern foo.*/bar
after foo.* as if it were a duplicate.
* sysdeps/unix/sysv/linux/ia64/brk.S: Add .type and .size for __curbrk.
__ASSUME_POSIX_TIMERS for Linux 2.5.63 and up.
2003-03-02 Ulrich Drepper <drepper@redhat.com>
* sysdeps/generic/bits/time.h: Define CLOCK_MONOTONIC.
* sysdeps/posix/clock_getres.c: Define code for CLOCK_REALTIME only
if not already defined. Use SYSDEP_GETRES to allow other files to
provide alternative implementations.
* sysdeps/unix/sysv/linux/clock_getres.c: New file
* sysdeps/unix/clock_gettime.c: Define code for CLOCK_REALTIME only
if not already defined. Use SYSDEP_GETTIME to allow other files to
provide alternative implementations.
* sysdeps/unix/sysv/linux/clock_gettime.c: New file.
* sysdeps/unix/clock_settime.c: Define code for CLOCK_REALTIME only
if not already defined. Use SYSDEP_GETTIME to allow other files to
provide alternative implementations.
* sysdeps/unix/sysv/linux/clock_settime.c: New file.
* sysdeps/unix/clock_nanosleep.c: Use SYSDEP_NANOSLEEP to allow
other files to provide alternative implementations. Rearrange
tests for invalid parameters.
* sysdeps/unix/sysv/linux/clock_nanosleep.c: New file.
* sysdeps/unix/sysv/linux/sysconf.c: New file.
* sysdeps/unix/sysv/linux/kernel-features.h: Define
__ASSUME_POSIX_TIMERS for Linux 2.4.63 and up.
* sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
_POSIX_MONOTONIC_CLOCK.
Don't use weak_extern for dl_rtld_map. Instead check only if [SHARED].
(elf_machine_rela): Clean up.
* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Clean up.
PowerPC TLS support contributed by Paul Mackerras <paulus@samba.org>.
* sysdeps/powerpc/powerpc32/elf/configure.in: New file.
* sysdeps/powerpc/powerpc32/elf/configure: New generated file.
* elf/tls-macros.h [__powerpc__ && !__powerpc64__]
(TLS_LE, TLS_IE, TLS_LD, TLS_GD): Define them.
* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Support
new relocs for TLS.
* sysdeps/powerpc/dl-tls.h (TLS_TP_OFFSET, TLS_DTV_OFFSET): Move these
macros out of [SHARED].
(TLS_TPREL_VALUE, TLS_DTPREL_VALUE): New macros.
* elf/elf.h: Define R_PPC_* relocs for TLS support.
Clean up R_PPC64_* macro definition comments.
From Jakub Jelinek <jakub@redhat.com>.
* sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Revert last change,
which duplicated the O_DIRECT defn.
2003-03-01 GOTO Masanori <gotom@debian.or.jp>
* stdlib/stdlib.h: Add missing __USE_BSD enclosure for BSD derived
random functions.
* resolv/Makefile (tests): Don't depend on
$(objpfx)mtrace-tst-leaks when cross compiling.
special case for dl_rtld_map in R_PPC64_RELATIVE; it's harmless to
repeat it and avoids the test for the common case.
Clean up and fix calculations for TLS relocs.
* sysdeps/powerpc/powerpc64/dl-tls.h: Moved to ...
* sysdeps/powerpc/dl-tls.h: ... here.
(TLS_TP_OFFSET): New macro.
* sunrpc/svc_udp.c (svcudp_recv): Add a cast to last change.
2003-02-25 Roland McGrath <roland@redhat.com>
* sysdeps/powerpc/powerpc64/dl-machine.h: Support new TLS relocs.
* sysdeps/powerpc/powerpc64/dl-tls.h: New file.
* resolv/Makefile (tests): Add tst-leaks.
($(objpfx)tst-leaks): Depend on $(objpfx)libresolv.so.
(tst-leaks-ENV): New variable.
($(objpfx)mtrace-tst-leaks): New target.
(tests): Depend on it.
* catgets/gencat.c (read_input_file): Collision between
auto-assigned numbers and user-defined nubmers is not fatal.
Handle it.
Patch by Michael M. Lampkin <michael.lampkin@ieee.org>.
* catgets/gencat.c (main): Return 1 if messages have been printed.