11.0-CURRENT (r292413) on a rpi2b: arm-gnueabi-freebsd/bin/ar, _fseeko, and memset vs memory alignment (SCTRL bit[1]=1?): Explains the Bus error?
Ian Lepore
ian at freebsd.org
Sat Dec 26 17:00:23 UTC 2015
On Fri, 2015-12-25 at 17:21 -0800, Mark Millard wrote:
> In my view "-mno-unaligned-access" is an even bigger hammer than I
> used. I find no clang statement about what its ABI consequences would
> be, unlike for what I did: What mix of more padding for alignment vs.
> more but smaller accesses? But as I remember I've seen "-mno
> -unaligned-access" in use in ports and the like so its consequences
> may be familiar material for some folks.
>
> Absent any questions about ABI consequences "-mno-unaligned-access"
> does well mark the expected SCTLR bit[1] status, far better than what
> I did. Again: I was covering my ignorance while making any
> significant investigation/debugging as unlikely as I could.
After reading the docs more carefully, I think -mno-unaligned-access
isn't a bigger hammer, it's just a different tool that addresses a
different problem than the one you ran into, and it's one we need. In
particular, it prevents alignment-required accesses to potentially
unaligned fields in a struct marked as 'packed', which is something we
rely on (it's why we mark some structs as packed).
-- Ian
More information about the freebsd-arm
mailing list