[PATCH] Avoid R_IA64_NONE relocations when relaxing

James E Wilson wilson@specifix.com
Mon Aug 8 22:55:00 GMT 2005

On Sat, 2005-08-06 at 08:12, H. J. Lu wrote:
> On Sat, Aug 06, 2005 at 04:43:08PM +0200, Andreas Schwab wrote:
> ...

So we have three patches.  Anyone want to argue for or against any of

The first patch from HJ, setting gp in elfNN_ia64_relax_section, does
not seem wise.  This is changing the gp value in the middle of a
relaxation pass.

The second patch from HJ, setting gp in elfNN_ia64_final_link, seems OK,
but has an incorrect comment.  It is possible for some sections to
increase in size when we start relaxation.  This happens when we insert
a trampoline for an out-of-range br.  However, no sections increase in
size after we start doing LTOFF22X relaxations, which is the important

The patch from Andreas seems to have the most thought put into it, but
it is also by far the most invasive, so it would be nice to have a
reason to justify it.  It does seem to be modifying gp in the proper
place, before each relaxation pass.  I think this patch has the
potential to perform more LTOFF22X relaxations.  As we reduce section
sizes, more symbol addresses will come within range of gp, and hence
more LTOFF22X relocations will get relaxed to GPREL22 relocs.  That may
be a good reason to go with this patch.
Jim Wilson, GNU Tools Support, http://www.specifix.com

More information about the Binutils mailing list