Add support to detect arm vs armv6

There are two different versions of the ARM ABI depending on the
TARGET_ARCH. As these are sligntly different a package built for one
may not work on another. We need to detect which one we are on by
parsing the .ARM.attributes section.

This will only work on the ARM EABI as this section is part of the ABI
definition. As armv6 only supports the ARM EABI this is not a problem
for the oabi.

Older versions of libelf in FreeBSD fail to read the .ARM.attributes
section needed. As armv6 is unsupported on these versions we can assume
we are running on arm.
Merge pull request #581 from zxombie/master

Add support to detect arm vs armv6