[PATCH] PR gold/17640
Cary Coutant
ccoutant@gmail.com
Mon Mar 30 18:47:00 GMT 2015
+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!
-cary
More information about the Binutils
mailing list