This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/14569] libpthread.a isn't linked in properly
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 16 Sep 2015 20:01:15 +0000
- Subject: [Bug nptl/14569] libpthread.a isn't linked in properly
- Auto-submitted: auto-generated
- References: <bug-14569-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=14569
--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/pthread/2.21 has been created
at a574db341f6583a625f529493ec423ab436f69c9 (commit)
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a574db341f6583a625f529493ec423ab436f69c9
commit a574db341f6583a625f529493ec423ab436f69c9
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Sep 13 06:01:04 2012 -0700
Use STB_SECONDARY on pthread functions in libc
Use STB_SECONDARY binding on pthread functions in libc so that they will
be preempted by definitions in libpthread at link-time as well as at
run-time.
* csu/libc-tls.c (__pthread_initialize_minimal): Mark it
secondary if HAVE_ASM_SECONDARY_DIRECTIVE is defined.
* misc/error.c (error): Replace pthread_setcancelstate with
__pthread_setcancelstate.
(error_at_line): Likewise.
* posix/wordexp.c (parse_comm): Likewise.
* stdlib/fmtmsg.c (fmtmsg): Likewise.
* nptl/Makefile: Include ../Makeconfig.
(libc-libpthread-routines): New macro.
(libc-libpthread-static-only-routines): Likewise.
(static-only-routines): Add $(libc-libpthread-static-only-routines)
if $(have-secondary) is yes.
(routines): Add $(libc-libpthread-routines) if $(have-secondary)
is yes.
(CFLAGS-libc-pthread_unwind.c): New.
* nptl/Versions [HAVE_ASM_SECONDARY_DIRECTIVE] (libc:GLIBC_2.0):
Add _pthread_cleanup_pop_restore, _pthread_cleanup_push_defer,
__pthread_getspecific, __pthread_setspecific,
__pthread_key_create, pthread_once, __pthread_once,
__pthread_mutex_lock and __pthread_mutex_unlock.
[HAVE_ASM_SECONDARY_DIRECTIVE] (libc:GLIBC_2.2): Add
__pthread_rwlock_init, __pthread_rwlock_destroy,
__pthread_rwlock_rdlock, __pthread_rwlock_wrlock and
__pthread_rwlock_unlock.
[HAVE_ASM_SECONDARY_DIRECTIVE] (libc:GLIBC_PRIVATE): Add
__pthread_unwind and __pthread_setcancelstate.
[HAVE_ASM_SECONDARY_DIRECTIVE] (libpthread:GLIBC_PRIVATE): Add
__pthread_setcancelstate.
* nptl/forward.c [HAVE_ASM_SECONDARY_DIRECTIVE] (FORWARD2): New.
(FORWARD_NORETURN): Likewise.
(pthread_setcancelstate): Renamed to ...
(__pthread_setcancelstate): This. Don't define if
(__pthread_unwind): Don't define if HAVE_ASM_SECONDARY_DIRECTIVE
is defined.
* nptl/libc-cleanup_defer_compat.c: New file.
* nptl/libc-pthread_getspecific.c: Likewise.
* nptl/libc-pthread_key_create.c: Likewise.
* nptl/libc-pthread_mutex_lock.c: Likewise.
* nptl/libc-pthread_mutex_unlock.c: Likewise.
* nptl/libc-pthread_once.c: Likewise.
* nptl/libc-pthread_rwlock_destroy.c: Likewise.
* nptl/libc-pthread_rwlock_init.c: Likewise.
* nptl/libc-pthread_rwlock_rdlock.c: Likewise.
* nptl/libc-pthread_rwlock_unlock.c: Likewise.
* nptl/libc-pthread_rwlock_wrlock.c: Likewise.
* nptl/libc-pthread_setcancelstate.c: Likewise.
* nptl/libc-pthread_setspecific.c: Likewise.
* nptl/libc-pthread_unwind.c: Likewise.
* nptl/nptl-init.c (pthread_functions): Don't include secondary
pthread functions in libc if HAVE_ASM_SECONDARY_DIRECTIVE is
defined. Replace ptr_pthread_setcancelstate with
ptr___pthread_setcancelstate.
* sysdeps/nptl/pthread-functions.h (pthread_functions): Likewise.
* nptl/pthreadP.h (__pthread_unwind): Don't mark it weak if
HAVE_ASM_SECONDARY_DIRECTIVE is defined.
(__pthread_cond_broadcast_2_0): Declare only if not in libc.
(__pthread_cond_destroy_2_0): Likewise.
(__pthread_cond_init_2_0): Likewise.
(__pthread_cond_signal_2_0): Likewise.
(__pthread_cond_timedwait_2_0): Likewise.
(__pthread_cond_wait_2_0): Likewise.
* scripts/abilist.awk: Support secondary symbols.
* sysdeps/generic/localplt.data: Allow pthread functions.
* sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/localplt.data: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise.
* sysdeps/nptl/bits/libc-lockP.h (PTFAVAIL): Defined as 1 if
HAVE_ASM_SECONDARY_DIRECTIVE is defined.
(__libc_maybe_call): Always call FUNC if
HAVE_ASM_SECONDARY_DIRECTIVE is defined.
(__libc_ptf_call): Likewise.
(__libc_ptf_call_always): Likewise.
(__pthread_mutex_init): Don't mark it weak if
HAVE_ASM_SECONDARY_DIRECTIVE is defined.
(__pthread_mutex_destroy): Likewise.
(__pthread_mutex_lock): Likewise.
(__pthread_mutex_trylock): Likewise.
(__pthread_mutex_unlock): Likewise.
(__pthread_mutexattr_init): Likewise.
(__pthread_mutexattr_destroy): Likewise.
(__pthread_mutexattr_settype): Likewise.
(__pthread_rwlock_destroy): Likewise.
(__pthread_rwlock_rdlock): Likewise.
(__pthread_rwlock_tryrdlock): Likewise.
(__pthread_rwlock_wrlock): Likewise.
(__pthread_rwlock_trywrlock): Likewise.
(__pthread_rwlock_unlock): Likewise.
(__pthread_key_create): Likewise.
(__pthread_setspecific): Likewise.
(__pthread_getspecific): Likewise.
(__pthread_once): Likewise.
(__pthread_initialize): Likewise.
(__pthread_atfork): Likewise.
(_pthread_cleanup_push_defer): Likewise.
(_pthread_cleanup_pop_restore): Likewise.
(__pthread_setcancelstate): New prototype.
(pthread_setcancelstate): Renamed to ...
(__pthread_setcancelstate): This. Don't mark it weak if
HAVE_ASM_SECONDARY_DIRECTIVE is defined.
* sysdeps/unix/sysv/linux/x86_64/cancellation.S (__pthread_unwind):
Likewise.
* sysdeps/unix/sysv/linux/fatal-prepare.h (FATAL_PREPARE): Always
call __pthread_setcancelstate if HAVE_ASM_SECONDARY_DIRECTIVE is
defined. Replace pthread_setcancelstate with
__pthread_setcancelstate.
* sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Make
__lll_lock_wait_private and __lll_unlock_wake_private weak in
libc.a.
* sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5c0fcf5e6abb72f16fc5a260218a3dc4d16a977f
commit 5c0fcf5e6abb72f16fc5a260218a3dc4d16a977f
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Sep 11 05:10:03 2012 -0700
Place libpthread.a right before libc.a
GCC driver places -lpthread in --start-group -lgcc -lgcc_eh -lpthread
-lc --end-group. Glibc tests should do the same.
[BZ #14569]
* Makeconfig (+link-static-before-libc): Also filter out
$(common-objpfx)nptl/libpthread%. Remove $(link-libc-static).
(link-libc-static-tests): Place libpthread.a before libc.a.
* nptl/Makefile (tests-static): Add tst-cancelx7-static,
tst-raise1-static and tst-cancel7-static.
(tests): Likewise.
* nptl/tst-cancel7-static.c: New file.
* nptl/tst-cancelx7-static.c: Likewise.
* nptl/tst-raise1-static.c: Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d8f0433371731d83a754ad173215e6a38d712424
commit d8f0433371731d83a754ad173215e6a38d712424
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Sep 11 06:27:40 2015 -0700
Make pthread_rwlock_destroy/pthread_rwlock_init/weak
* pthread_rwlock_destroy.c (pthread_rwlock_destroy): Replace
strong_alias with weak_alias.
* pthread_rwlock_init.c (pthread_rwlock_init): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=af345c230d3f2d2b810cfec292188e26c3da5a48
commit af345c230d3f2d2b810cfec292188e26c3da5a48
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Sep 10 13:41:43 2015 -0700
Add STB_SECONDARY support to conform/linknamespace.pl
* conform/linknamespace.pl (list_syms): Support STB_SECONDARY.
-----------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.