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.
* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
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>.
* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela):
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 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
(__condvar_cleanup): Wake up all waiters in case we got signaled
after being woken up but before disabling asynchronous
cancellation.
* sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
(__condvar_cleanup): Likewise.
* init.c (__NR_set_tid_address): If already defined, don't redefine.
Make it an error if architecture has no #if case. Add x86-64.
* sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
pt-initfini.s generation.
* sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
(TLS_INIT_TP): Fix typo.
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.
* sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
(create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
Use ARCH_CLONE.
* allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
[NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
ALLOCATE_STACK): New macros.
(TLS_TPADJ): New macro.
(get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
(allocate_stack): Handle TLS_DTV_AT_TP and
NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
* pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
Don't set PD->self.
* init.c [__ia64__] (__NR_set_tid_address): Define.
* sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
* sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
* sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
* sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
unused code.
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
(__lll_mutex_lock_wait): Reverse order of first two parameters.
(__lll_mutex_timedlock_wait): Likewise.
(lll_mutex_lock): Adjust asm for that.
(lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
(lll_lock): Adjust asm for operand order change.
* sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
* sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
Reverse order of parameters.
(__lll_timedwait_tid): Remove regparms attribute.
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
* sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
* sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
__lll_mutex_timedlock_wait only for NOT_IN_libc.
* sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
lowlevelmutex.S.
* sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
for NOT_IN_libc.
* sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
lowlevellock.S.
* sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
LOCK is already defined. Don't define __lll_mutex_timedlock_wait
for libc.so.
* sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
define LOCK here (if UP is not defined). The actual code is in
lowlevelmutex.S.
* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
LOCK is already defined. Don't define lll_unlock_wake_cb and
__lll_timedwait_tid for libc.so.
* sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
define LOCK here (if UP is not defined). The actual code is in
lowlevellock.S.