[PATCH][SH] Ensure that offset alignments are valid
Andrew STUBBS
andrew.stubbs@st.com
Tue Apr 15 13:54:00 GMT 2008
Kaz Kojima wrote:
>> I never saw this problem before because the compiler does not (usually?)
>> produce PC-relative code with far destinations, and anyway relaxation is
>> broken elsewhere, I think.
>
> I agree with you. It would not be worth to effort to fix this
> for the relax case at this time.
Well, I don't really want to introduce a regression - as far as I know
this aspect of relaxation isn't broken.
I think I have figured out (a way) how to fix the problem - do the new
offset checks if and only if neither of the symbols present in the fix
data are undefined. If this is not that case the code behaves exactly as
before.
The attached patch includes this fix, and also has all the necessary
updates the testsuite. It now passes the testsuite with exactly the same
results as before, plus four new passes from the new test case I added.
I'm not certain that this is the best possible fix - I'm not really sure
how the fixups are used. I suspect there may be some cases where the
test would be applicable, but the prerequisite condition is not met (not
that I have any evidence for that).
I have a real-world build test running at the moment. Assuming that
doesn't find anything, is this OK?
Andrew
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: unaligned-mova.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20080415/12461877/attachment.ksh>
More information about the Binutils
mailing list