This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] PR gold/17640
- From: Ilya Tocar <tocarip dot intel at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>, Cary Coutant <ccoutant at google dot com>, Ian Lance Taylor <iant at google dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Wed, 18 Feb 2015 18:00:11 +0300
- Subject: Re: [PATCH] PR gold/17640
- Authentication-results: sourceware.org; auth=none
- References: <20150202134701 dot GA91020 at msticlxl7 dot ims dot intel dot com> <CAMe9rOpzSBoiykoFG+YuAK8QYsguqzZNrvj2sE7EhafUzOjJJw at mail dot gmail dot com>
On 02 Feb 06:41, H.J. Lu wrote:
> On Mon, Feb 2, 2015 at 5:47 AM, Ilya Tocar <email@example.com> wrote:
> > Hi,
> > This patch adds mov to lea conversion to gold (as discussed in PR).
> > It provides about 1.5% performance gain on SPEC2000 geomean,
> > when pie is used.
> > OK for trunk?
> The patch is incomplete. Gold generates a useless R_386_RELATIVE
> relocation together with an unused GOT slot:
I've tried to implement this, however I've encountered some difficulties.
It looks like not creating got slots/relocation in
Target_i386::Scan::local for R_386_GOT32 (that will be converted to
R_386_GOTOFF later) is the right approach.
However in Scan::local we don't have access to corresponding view, and so we are
unable to check wether we are dealing with mov (which can be optimized),
or something else.
Can you provide some advice on how to check for mov's in scan?
Or is there a better approach?