This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PPC gold doesn't check for overflow properly
- From: Cary Coutant <ccoutant at google dot com>
- To: Cary Coutant <ccoutant at google dot com>, Binutils <binutils at sourceware dot org>
- Date: Thu, 20 Nov 2014 13:58:25 -0800
- Subject: Re: PPC gold doesn't check for overflow properly
- Authentication-results: sourceware.org; auth=none
- References: <CAHACq4rr8Z6bKL74tmunhwZYUJx1s6md=+0vg5+oWVDjNr84bA at mail dot gmail dot com> <20141120111444 dot GB4477 at bubble dot grove dot modra dot org> <CAHACq4piLzr-ci8w9c-tC_+qzf13Ar-shNAgw_028kvmtO7jKQ at mail dot gmail dot com> <20141120215112 dot GC4477 at bubble dot grove dot modra dot org>
>> + 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