[ELF] Introduce range extension thunks for ARM

Authored by peter.smith on Oct 27 2017, 2:04 AM.


[ELF] Introduce range extension thunks for ARM

This change adds initial support for range extension thunks. All thunks must
be created within the first pass so some corner cases are not supported. A
follow up patch will add support for multiple passes.

With this change the existing tests arm-branch-error.s and
arm-thumb-branch-error.s now no longer fail with an out of range branch.
These have been renamed and tests added for the range extension thunk.

Differential Revision: https://reviews.llvm.org/D34691

llvm-svn: 316752