This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Convert mov to lea for loading local function address
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Cc: binutils at sourceware dot org
- Date: Fri, 31 Aug 2012 07:11:34 -0700
- Subject: Re: PATCH: Convert mov to lea for loading local function address
- References: <20120831042236.GA19539@intel.com>
On Thu, Aug 30, 2012 at 9:22 PM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> Hi,
>
> I am checking in this patch to convert move mov to lea for loading local
> function address.
>
> bfd/
>
> 2012-08-30 H.J. Lu <hongjiu.lu@intel.com>
>
> * elf32-i386.c (elf_i386_relocate_section): Convert
> "mov foo@GOT(%reg), %reg" to "lea foo@GOTOFF(%reg), %reg"
> for local symbols.
>
> * elf64-x86-64.c (elf_x86_64_relocate_section): Convert
> "mov foo@GOTPCREL(%rip), %reg" to "lea foo@GOTOFF(%reg), %reg"
> for local symbols.
>
I used the new binutils on glibc for both i386 and x86-64. It
converted more than a dozen mov to lea in libc.so and one
in ld.so.
--
H.J.