https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88469

--- Comment #13 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
(In reply to Stefan Ring from comment #12)
> Unfortunately my armv5 device has died in the meantime, so I cannot verify
> my original use case. The behavior is indeed different on armv7. It does not
> trap, even for the original misaligned code. And contrary to x86, where the
> alignment check flag can be changed by user space, this is a privileged
> operation on arm, so I cannot even selectively enable it.

Note that if you have root access on your board you can modify the kernel's
behaviour for various unaligned accesses by changing /proc/cpu/alignment (see
Documentation/arm/mem_alignment in the kernel sources).  You might want to try
setting this to 3 to get the kernel to report (but fix up) any misaligned
accesses).

Reply via email to