ARM: by default don't set the Thumb bit on MachO relocated values.
authorTim Northover <tnorthover@apple.com>
Thu, 25 Aug 2016 20:41:30 +0000 (20:41 +0000)
committerTim Northover <tnorthover@apple.com>
Thu, 25 Aug 2016 20:41:30 +0000 (20:41 +0000)
commit3495647d0dc63a5a657794134afa19a8fc80cb1b
tree68a809608739129f2ab63cbc7c0e5331ff75baed
parentf2308b31a08ce008d55fced9c334660a9cc4ee1f
ARM: by default don't set the Thumb bit on MachO relocated values.

Its existence is largely historical, apparently we tried to make ARM object
files look maybe-almost-possibly runnable by putting our best guess at the
actual value into relocated locations. Of course, the real linker then comes
along and can completely change things.

But it should only be there for word-sized and movw/movt relocations. It can't
be encoded in branch relocations, and I've seen it mess up validity
calculations twice in the last couple of weeks so the default is clearly problematic.

llvm-svn: 279773
llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
llvm/test/MC/ARM/aligned-blx.s
llvm/test/MC/ARM/macho-word-reloc-thumb.s [new file with mode: 0644]