[LLD][ELF][ARM] use .reloc directive for Thumb assembler tests
authorPeter Smith <peter.smith@arm.com>
Mon, 30 Mar 2020 14:04:26 +0000 (15:04 +0100)
committerPeter Smith <peter.smith@arm.com>
Fri, 3 Apr 2020 10:44:31 +0000 (11:44 +0100)
commitda74537e870d7b40ae927c51e67138c416560d23
tree3f727080453be2307436284dea6994fe3b886497
parent1a584a8d509f2705b65bd70913e4fb8d25f283ed
[LLD][ELF][ARM] use .reloc directive for Thumb assembler tests

In the near future llvm-mc will resolve the fixups that generate
R_ARM_THUMB_PC8 and R_ARM_THUMB_PC12 at assembly time (see comments in
D72892), and forbid inter-section references. Change the LLD tests for
these relocations to use .inst and .reloc to avoid LLD tests failing when
this happens. The tests generate the same instructions, relocations
and symbols.

I will need to make equivalent changes for D75349 Arm equivalent
relocations, but this is still in review so these don't need changing
before llvm-mc.

Differential Revision: https://reviews.llvm.org/D77200
lld/test/ELF/arm-thumb-adr-err.s
lld/test/ELF/arm-thumb-adr.s
lld/test/ELF/arm-thumb-ldrlit-err.s
lld/test/ELF/arm-thumb-ldrlit.s
lld/test/ELF/arm-thumb2-adr-err.s
lld/test/ELF/arm-thumb2-adr.s
lld/test/ELF/arm-thumb2-ldrlit-err.s
lld/test/ELF/arm-thumb2-ldrlit.s