[ipxe-devel] [PATCH 1/1] [arm] add -mno-unaligned-access compiler flag

Michael Brown mcb30 at ipxe.org
Thu Apr 19 18:06:24 UTC 2018


On 19/04/18 16:26, Mark Rutland wrote:
>> For better or worse, I don't think that it is sufficient to pass the
>> compiler -mno-unaligned-accesses, even if it happens to mask the problem
>> in this specific case. The compiler can validly assume structures have
>> their usual alignment, and hence the LDRD should not be misaligned.
 >
 > <snip>
> 
> ... whereas using packed (rather than aligned(1), which I was wrong
> about):
 >
 > <snip>
> 
> ... which should avoid alignment traps so long as SCTLR.A is clear to
> permit unaligned LDR.

Fantastic; thank you for such a detailed response!

I've pushed a fix to add the missing __attribute__((packed)):

   http://git.ipxe.org/ipxe.git/commitdiff/e901e6b73

Heinrich: does this fix the problem?

Thanks,

Michael



More information about the ipxe-devel mailing list