PPC gold doesn't check for overflow properly

Cary Coutant ccoutant@google.com
Thu Nov 20 21:58:00 GMT 2014


>> +    Status stat = This::template rela<32,26>(view, 0, 0x03fffffc,
>> +                                            value, overflow);
>>
>> Given the right shift, shouldn't that be 24?
>
> No.  The right shift here is 0.  The field has 24 bits (hence the
> name), but the bottom 2 bits of the value are masked.  So the range is
> that for a signed 26-bit multiple of four.

Oh, yeah. Duh. I have no idea where I got the idea that the shift was 2.

Thanks for the quick fixes!

-cary



More information about the Binutils mailing list