[PATCH] Avoid R_IA64_NONE relocations when relaxing

H. J. Lu hjl@lucon.org
Tue Aug 9 04:13:00 GMT 2005


On Mon, Aug 08, 2005 at 07:13:25PM -0700, James E Wilson wrote:
> On Mon, 2005-08-08 at 18:28, H. J. Lu wrote:
> > But do we run another relaxation pass of the first LTOFF22X
> > relaxation pass?
> 
> We set *again to TRUE to force another relaxation pass.  Once
> need_relax_finalize has been cleared, all following relaxation passes
> will handle LTOFF22X relocs, so there will always be multiple LTOFF22X
> relaxation passes if we have any satisfied LTOFF22X relocs.

We have

  *again = FALSE;

  if ((sec->flags & SEC_RELOC) == 0
      || sec->reloc_count == 0
      || (!link_info->need_relax_finalize
          && sec->need_finalize_relax == 0))
    return TRUE;

..

        case R_IA64_LTOFF22X:
        case R_IA64_LDXMOV:
          /* We can't relax ldx/mov before the finalize pass since
             br relaxations will increase the code size. Defer it to
             the finalize pass.  */
          if (link_info->need_relax_finalize)
            {
              sec->need_finalize_relax = 1;
              continue;
            }

  if (!link_info->need_relax_finalize)
    sec->need_finalize_relax = 0;

It seems to be that we won't have another relaxation pass after
the final relaxation pass.

I don't know if we can move R_IA64_LTOFF22X relaxations before the
final one.


H.J.



More information about the Binutils mailing list