In the thread starting here:
https://lists.freebsd.org/pipermail/freebsd-arm/2015-January/009998.html
Daisuke Aoyama describes how libcxxrt does not properly handle parsing
an exception table on an RPi (e.g. arm). This is because parts of
dwarf_eh.h read 16 bit, 32 bit and 64 bit values directly from possibly
unaligned addresses.
He posted a workaround patch here:
https://lists.freebsd.org/pipermail/freebsd-arm/2015-January/010014.html
but it is incomplete, as it does not handle the 16 and 64 bit cases, nor
does it work for other architectures with strict alignment.
Here is another attempt, where I put the reading of different sized
objects into their own static inline functions, and try to handle
alignment and endianness properly.
This seems to work on i386 and amd64, but I can't test arm and/or mips
myself.
Also, I now assume the NO_STRICT_ALIGNMENT and LITTLE_ENDIAN__
macros are available, and works as expected. That shoudl probably be
refined before we send this upstream. Unfortunately these are both
non-standard, and there seems to be no reliable way of determining them
portably.