This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mips: branches to external labels are broken


Alexandre Oliva wrote:
[snip]
> >> So, yes, HAVE_NEWABI is the right check.  It has nothing to do with
> >> EMBEDDED_PIC, even though I do concede that, if we get to that point
> >> with mips_pic != EMBEDDED_PIC with !fixP->fx_done, we're going to emit
> >> an error message because we're going to need a relocation that we
> >> can't represent.
> 
> > I don't understand this reasoning. We are in the BFD_RELOC_16_PCREL_S2
> > case here
> 
> It was BFD_RELOC_16_PCREL too.

Your patch removes this case.

> > which is invalid for anything else than EMBEDDED_PIC.
> 
> There's no reason to assume so.  The hack becomes pointless (and
> wrong) when we do RELA instead of REL.  EMBEDDED_PIC has nothing to do
> with RELAness, it's HAVE_NEWABI that does, so that's the right test.

NewABI has no BFD_RELOC_16_PCREL_S2 relocation. A test for
HAVE_NEWABI there is at least misleading.

> > HAVE_NEWABI must always be false there.
> 
> I don't know that EMBEDDED_PIC and NEWABI are incompatible, and I
> don't really care.  EMBEDDED_PIC is not the right test there, since
> the real test to be done is whether the addend is going to be
> installed in place or not.

What about checking the howto for partial_inplace then? Or simply
rely on the fact that there is no howto without partial_inplace for
BFD_RELOC_16_PCREL_S2, IOW don't do this check at all.


Thiemo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]