OSDN Git Service

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)
commit6361cd131c894166d7979beb8f8c7beb819e31ee
tree9f4d0e53453254d6d7ab5b9e3e94553d5e2cead9
parentc76060f3851a939e3a26f3b84e1ce83270db54f3
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279773 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
test/MC/ARM/aligned-blx.s
test/MC/ARM/macho-word-reloc-thumb.s [new file with mode: 0644]