arm: correctly decode Tag_THUMB_ISA_use=3 for thumb2 features
This was detected when a user accidentally tried to build a shared
library using armv8-m.main objects. The resulting error was "warning:
thumb-1 mode PLT generation not currently supported". Something was
clearly wrong because v8-m.main is a thumb-2 variant.
It turns out that the code to detect thumb-2 in object files hadn't
been updated for the extended definition of Tag_THUMB_ISA_use to
support the value 3, meaning 'work it out for yourself from the
architecture tag'; something that is now necessary given that the line
between thumb-1 and thumb-2 has become blurred over time.
Another problem with the function doing this calculation was that the
absence of this tag (implying a default value 0) should mean use of
thumb code was NOT permitted. However, the code went on to look at
the architecture flags and decide that it could ignore this if the
architecture flags said that thumb2 features were available, thus
completely ignoring the intended meaning.
bfd/
* elf32-arm.c (using_thumb2): Correctly handle Tag_THUMB_ISA_use
values 0 and 3.