[PATCH][SH] Ensure that offset alignments are valid

Andrew STUBBS andrew.stubbs@st.com
Fri Apr 11 15:04:00 GMT 2008


The attached patch adds an error message, to the SH assembler, rejecting 
all invalid BFD_RELOC_SH_PCRELIMM8BY4 relocations.

Specifically, the PC to destination offset must not be negative, and the 
destination must be 4-byte aligned.

At present, incorrect values are silently mis-assembled.

This patch has some fallout in the testsuite results (the arch tests use 
misaligned targets). I shall fix that up if this patch is OK.

Andrew Stubbs
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: unaligned-mova.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20080411/1484ffe9/attachment.ksh>

More information about the Binutils mailing list