From: Jan Hubicka <hubicka@ucw.cz>
To: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Xinliang David Li <davidxl@google.com>,
Dehao Chen <dehao@google.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Jan Hubicka <hubicka@ucw.cz>,
"Joseph S. Myers" <joseph@codesourcery.com>
Subject: Re: [GOOGLE] Avoid emitting duplicated weakref
Date: Tue, 11 Jun 2013 09:23:00 -0000 [thread overview]
Message-ID: <20130611092346.GC14227@kam.mff.cuni.cz> (raw)
In-Reply-To: <CAC1BbcSv4arkRMD5tvL5ApUU=cfv4pAzcyTXZ10sycz4KawyLQ@mail.gmail.com>
> On 9 June 2013 05:31, Xinliang David Li <davidxl@google.com> wrote:
> > Guard also with L_IPO_COMP_MODE as this is lipo specific.
>
> Sounds like this is the LIPO incarnation of http://gcc.gnu.org/PR31537
>
> See the patch at http://gcc.gnu.org/PR31537#c9 for not adding the
> alias in the first place (back then, honza may have changed that
> recently on trunk).
>
> Honza, Joseph,
> Are there rules for handling weakrefs in some standard? If so, which ones?
Not that I would know of. It is an extension engineered for glibc pthreads. in
mainline I quite changed way weakrefs are handled and I still plan to do more.
What LTO does now is to handle weakref symbol as static symbol despite it has
DECL_EXTERNAL on it. (I have patch in queue to really make it static).
This is because the symbol never hits the exported symbol table anyhow.
I.e. you can have:
cat f1.i
static __gthrw_pthread_once __attribute__ ((__weakref__ ("pthread_once")));
$ cat f2.i
static __gthrw_pthread_once __attribute__ ((__weakref__ ("comething_completely_else")));
that will break with your do_assemble_alias change. with LTO you will now get
__gthrw_pthread_once.1 and __gthrw_pthread_once.2 with proper weakref targets.
Honza
prev parent reply other threads:[~2013-06-11 9:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-09 3:30 Dehao Chen
2013-06-09 3:31 ` Xinliang David Li
2013-06-11 9:09 ` Bernhard Reutner-Fischer
2013-06-11 9:23 ` Jan Hubicka [this message]
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=20130611092346.GC14227@kam.mff.cuni.cz \
--to=hubicka@ucw.cz \
--cc=davidxl@google.com \
--cc=dehao@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=joseph@codesourcery.com \
--cc=rep.dot.nop@gmail.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).