This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [M32C] : No error is reported when relocation gets overflowed.
- From: DJ Delorie <dj at redhat dot com>
- To: Prafulla dot Thakare at kpitcummins dot com
- Cc: binutils at sourceware dot org
- Date: Wed, 23 May 2007 12:28:39 -0400
- Subject: Re: [M32C] : No error is reported when relocation gets overflowed.
- References: <4A1BE23A7B777442B60F4B4916AE0F1310D1EA7B@sohm.kpit.com>
> I guess, the above behavior is because of the patch provided in link
> above.
>
> It would be better to complain for overflowed relocations instead of
> generating wrong code, which finally does not work.
>
> Also, I would like to know, if this is done in order to fix or get some
> workaround for 24 bit pointer issue in GCC for M16C targets.
The problem is that the m32c chips don't have signed offsets against
the address registers, so to simulate a signed offset, gcc uses a huge
offset and lets it wrap.
I guess the solution is that we can't use any of the built-in overflow
detectors, and we'll have to do it ourselves.