From: Ian Lance Taylor <iant@google.com>
To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com
Subject: Re: libgcc patch committed: Change __real_pthread_create ref to be non-weak
Date: Mon, 14 Jan 2013 19:38:00 -0000 [thread overview]
Message-ID: <CAKOQZ8z6qouhL6XqPananbOsb1d0H5Kg0C0sBapPkVjVBK490A@mail.gmail.com> (raw)
In-Reply-To: <mcrr4lnimq3.fsf@google.com>
On Mon, Jan 14, 2013 at 11:33 AM, Ian Lance Taylor <iant@google.com> wrote:
> The declaration of __real_pthread_create in generic-morestack-thread.c
> had attribute weak. Note that this code is linked with --wrap
> pthread_create, so the reference to __real_pthread_create is really to
> pthread_create. Using weak was incorrect, because the reference really
> is a strong one. There is no support for __real_pthread_create aka
> pthread_create to not be defined. It caused some Go programs to fail
> when linking statically, because a weak reference does not cause a
> symbol definition to be included from an archive. If there was no other
> reason to include pthread_create, then pthread_create would never be
> defined, so the call to __real_pthread_create would crash at runtime.
>
> This fixes a regression, as static linking of Go programs used to work.
>
> Bootstrapped and ran Go testsuite and split-stack tests on
> x86_64-unknown-linux-gnu. Committed to mainline.
Sigh, this turned out to be wrong because it causes libgcc_s.so to
require libpthread.so.
Reverted.
Ian
next prev parent reply other threads:[~2013-01-14 19:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 19:33 Ian Lance Taylor
2013-01-14 19:38 ` Ian Lance Taylor [this message]
2013-01-14 19:42 ` H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKOQZ8z6qouhL6XqPananbOsb1d0H5Kg0C0sBapPkVjVBK490A@mail.gmail.com \
--to=iant@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gofrontend-dev@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).