This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] PR gold/17640
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Cary Coutant <ccoutant at gmail dot com>
- Cc: Ilya Tocar <tocarip dot intel at gmail dot com>, Cary Coutant <ccoutant at google dot com>, Binutils <binutils at sourceware dot org>
- Date: Mon, 30 Mar 2015 11:50:13 -0700
- Subject: Re: [PATCH] PR gold/17640
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOq-uSd64h6eeogR3SywtQipMupN9Ng9-EvPLF+3bp7Exw at mail dot gmail dot com> <20150305104052 dot GA16361 at msticlxl7 dot ims dot intel dot com> <CAMe9rOqRQ+HMS12+hn9Nz0pnb95tUDmbAU2QjK9G1Rc-q=woCA at mail dot gmail dot com> <20150310112745 dot GA104717 at msticlxl7 dot ims dot intel dot com> <CAMe9rOoG6NOVLYxZBJ5KRuS9_47=ptsd=Ft9iA9HfN2Asw0UeQ at mail dot gmail dot com> <20150312143236 dot GA95320 at msticlxl7 dot ims dot intel dot com> <CAMe9rOpn0uGDm1qbwgL-7CiYKjQeSHMHX6WzsnZ6eyfcp2MBAw at mail dot gmail dot com> <20150312145732 dot GB95320 at msticlxl7 dot ims dot intel dot com> <CAHACq4qF26jr8QYR_V55oVewLyHpgD2g7TrxDmgye0_S4pdroQ at mail dot gmail dot com> <20150317214047 dot GA49894 at msticlxl7 dot ims dot intel dot com> <20150323150133 dot GA10265 at msticlxl7 dot ims dot intel dot com> <CAJimCsGb5jO0z6a=eqMXSvjZ8snxf_ihbj4W1rx7+LzhJ6onVw at mail dot gmail dot com>
On Mon, Mar 30, 2015 at 11:47 AM, Cary Coutant <ccoutant@gmail.com> wrote:
> +2015-03-18 Ilya Tocar <ilya.tocar@intel.com>
> +
> + PR gold/17640
> + * i386.cc (Target_i386::Scan::local): Don't create GOT entry, when we
> + can convert GOT to GOTOFF.
> + (Target_i386::Scan::global): Ditto.
> + (Target_i386::Relocate::relocate): Convert mov foo@GOT(%reg), %reg to
> + lea foo@GOTOFF(%reg), %reg if possible.
> + * testsuite/Makefile.am (i386_mov_to_lea): New test.
> + * testsuite/i386_mov_to_lea1.s: New.
> + * testsuite/i386_mov_to_lea2.s: Ditto.
> + * testsuite/i386_mov_to_lea3.s: Ditto.
> + * testsuite/i386_mov_to_lea4.s: Ditto.
> + * testsuite/i386_mov_to_lea5.s: Ditto.
> + * testsuite/i386_mov_to_lea.sh: Ditto.
>
> ChangeLog needs an entry for Sized_target::can_convert_mov_to_lea.
>
> + // If the relocation symbol isn't IFUNC,
> + // and is local, then we will convert
> + // mov foo@GOT(%reg), %reg
> + // to
> + // lea foo@GOTOFF(%reg), %reg
> + // in Relocate::relocate
>
> In comments, please end sentences with periods.
>
> + if (reloc.get_r_offset() >= 2
> + && Target_i386::can_convert_mov_to_lea (gsym))
>
> In gold, no space before ().
>
> + // Convert
> + // mov foo@GOT(%reg), %reg
> + // to
> + // lea foo@GOTOFF(%reg), %reg
> + // if possible
>
> Period at end of sentence.
>
> This is OK with those fixes. Thanks!
>
Ilya, please apply for write access to binutils-gdb git repo at
https://sourceware.org/
You can use me as your sponsor.
Thanks.
--
H.J.