[PATCH] Re-enable a hook in MCELFObjectTargetWriter to allow target-specific relocationtable sorting and use this hook for Mips.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Mar 13 08:05:10 PDT 2015


> And it is not possible for a file to mix relocations from these sets? I.E, no file will ever have a R_MIPS16_LO16 and a R_MIPS_HI16? If that is not the case I think there is a bug in gold :-)
>
> Well, you can have this in a .S file:
>
> lui  $2,%hi(sym1)
> .set mips16
> li   $2,%lo(sym1)
>
> Then relocations would be:
> 00000000  00000605 R_MIPS_HI16       00000000   sym1
> 00000004  00000669 R_MIPS16_LO16     00000000   sym1
>
> so the first relocation wouldn't match the second.

Simon,

It looks like gold would match these. Is that a bug in gold?

Looking at the patch itself in a sec.

Cheers,
Rafael



More information about the llvm-commits mailing list