This is the mail archive of the binutils@sourceware.org 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: [PATCH] Relax MIPS j/jal out-of-range check


Eric Christopher <echristo@apple.com> writes:
> On May 10, 2006, at 10:02 AM, Daniel Jacobowitz wrote:
>
>> On Wed, May 10, 2006 at 06:00:23PM +0100, Thiemo Seufer wrote:
>>> Hm, indeed. Do you like the appended patch better? Should something
>>> similiar go in the branch?
>>
>> I do - I'll leave it up to your judgement whether this is correct,
>> but feel free to apply it to the branch if it is.
>
> I'll agree as well, I think we should only be checking this via  
> overflow in the linker.

But we won't be checking overflow in the linker in the case Dan gave:

        jal 0x10000000

Thiemo is patching code that handles fixups at assembly time, so after
the patch, gas will just silently assemble this as "jal 0".  I agree
that's the right thing to do though, for the reasons already discussed.
(Note that the linker doesn't warn about overflow for jals to local
symbols anyway, presumably for the same reasons that we don't want
an error here.)

Richard


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