From: "H.J. Lu" <hjl.tools@gmail.com>
To: Richard Henderson <rth@twiddle.net>
Cc: Andreas Krebbel <krebbel@linux.vnet.ibm.com>,
David Miller <davem@davemloft.net>,
aj@suse.com, libc-alpha@sourceware.org,
Binutils <binutils@sourceware.org>
Subject: Re: [PATCH] S/390: Fix two issues with the IFUNC optimized mem* routines
Date: Sun, 02 Sep 2012 20:06:00 -0000 [thread overview]
Message-ID: <CAMe9rOqep_6WXwFLYmU5n86CgHS=g9_iVkmU3hSJ09qhHkYYYA@mail.gmail.com> (raw)
In-Reply-To: <5043B674.1030108@twiddle.net>
On Sun, Sep 2, 2012 at 12:41 PM, Richard Henderson <rth@twiddle.net> wrote:
> On 2012-09-02 07:50, H.J. Lu wrote:
>> A relax pass won't work properly for x86 without some surgery
>> since lang_relax_sections is called after bfd_elf_size_dynamic_sections
>> which calls elf_x86_64_allocate_dynrelocs to allocate GOT entries
>> and dynamic relocations. After it is done, it is not to easy to undo
>> the damage.
>
> Other targets keep usage counts of GOT entries live throughout relaxation.
> It becomes easy to adjust the GOT *after* bfd_elf_size_dynamic_sections
> has been called. Indeed, many targets require this ordering since some
> of the optimizations applied are true relaxations, and require knowledge
> of true displacements. And indeed, the reduction in GOT size may enable
> another relaxation pass, enabling further optimizations to succeed.
That is true. IA64 needs more than one pass to do it properly.
>> This is a separate issue. X86 backends also optimize
>> TLS relocations. Some compilers generate bad TLS
>> sequences which lead to corrupted output:
>>
>> http://sourceware.org/bugzilla/show_bug.cgi?id=4928
>>
>> But there is no way to turn off the TLS optimization.
>
> ... because it was done in the wrong place. An excellent opportunity
> to move the TLS relaxations to a relaxation pass, wouldn't you agree?
>
I think it is overkill for x86 since all relocations targets can be reached.
I don't want to make big changes in relaxation codes for this.
--
H.J.
prev parent reply other threads:[~2012-09-02 20:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <503E009B.3080302@linux.vnet.ibm.com>
[not found] ` <CAMe9rOrmiF3VZOBNvEbMV5jFNog1-_EoPoT9rHTUQFsANaSD8w@mail.gmail.com>
[not found] ` <503E3930.5040603@linux.vnet.ibm.com>
[not found] ` <20120829.125208.824114683359549094.davem@davemloft.net>
[not found] ` <503F14A3.8070801@linux.vnet.ibm.com>
[not found] ` <CAMe9rOozW=4q_a=nmNvbZhsXooRZ4opvTTNtq2WHcGSSd2ONOw@mail.gmail.com>
2012-08-31 1:10 ` H.J. Lu
2012-08-31 14:43 ` Richard Henderson
2012-08-31 19:16 ` H.J. Lu
2012-09-01 16:51 ` Richard Henderson
2012-09-01 17:22 ` H.J. Lu
2012-09-01 21:25 ` Richard Henderson
2012-09-02 14:50 ` H.J. Lu
2012-09-02 19:41 ` Richard Henderson
2012-09-02 20:06 ` H.J. Lu [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='CAMe9rOqep_6WXwFLYmU5n86CgHS=g9_iVkmU3hSJ09qhHkYYYA@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=aj@suse.com \
--cc=binutils@sourceware.org \
--cc=davem@davemloft.net \
--cc=krebbel@linux.vnet.ibm.com \
--cc=libc-alpha@sourceware.org \
--cc=rth@twiddle.net \
/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).