This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] S/390: Fix two issues with the IFUNC optimized mem* routines
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Richard Henderson <rth at twiddle dot net>
- Cc: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>, David Miller <davem at davemloft dot net>, aj at suse dot com, libc-alpha at sourceware dot org, Binutils <binutils at sourceware dot org>
- Date: Sun, 2 Sep 2012 07:50:32 -0700
- Subject: Re: [PATCH] S/390: Fix two issues with the IFUNC optimized mem* routines
- References: <503E009B.3080302@linux.vnet.ibm.com> <CAMe9rOrmiF3VZOBNvEbMV5jFNog1-_EoPoT9rHTUQFsANaSD8w@mail.gmail.com> <503E3930.5040603@linux.vnet.ibm.com> <20120829.125208.824114683359549094.davem@davemloft.net> <503F14A3.8070801@linux.vnet.ibm.com> <CAMe9rOozW=4q_a=nmNvbZhsXooRZ4opvTTNtq2WHcGSSd2ONOw@mail.gmail.com> <CAMe9rOpc7KHMXk8xrQV3p2fAn-uTWZJ91R6k=DbCXENs43Kemw@mail.gmail.com> <5040CCC6.4030809@twiddle.net> <CAMe9rOr2Vic9vENNbRf5_z22-kMS2Uu-6Lsgd_Xi6bctw6CF4w@mail.gmail.com> <50423CF8.7000309@twiddle.net> <CAMe9rOor=+aUhtadjDWzT9gHJvteZouk7-cvF_U=k=2vdFgsNA@mail.gmail.com> <50427D29.1010205@twiddle.net>
On Sat, Sep 1, 2012 at 2:24 PM, Richard Henderson <rth@twiddle.net> wrote:
> On 2012-09-01 10:21, H.J. Lu wrote:
>> It may work for other targets. But x86 doesn't have a relax
>> pass. I believe doing it in size_dynamic_sections is more
>> sensible.
>
> It *should* have a relax pass. Especially as that allows one
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.
> to turn it all off just in case a bug is encountered.
>
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. It
will be nice to move disable_target_specific_optimizations
from command_line to link_info so that a backend
can check it.
--
H.J.