ELF/AArch64: Fix R_AARCH64_LDST16_ABS_LO12_NC mask
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 5 Dec 2016 14:15:44 +0000 (14:15 +0000)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 5 Dec 2016 14:15:44 +0000 (14:15 +0000)
commita47ba192dc0adc88311d3c3cafc298f53861c616
tree26dbfc2c30b6a54c36cbe3ca8561673b6b252929
parentdf310646d891f9f5c20c0cb8449ed4a61ad21f48
ELF/AArch64: Fix R_AARCH64_LDST16_ABS_LO12_NC mask

The relocation R_AARCH64_LDST16_ABS_LO12_NC should set a ld/st
immediate value to bits [11:1] not [11:2].  This patches fixes it
and adds a testcase for regression.

With this fix all the faulty tests on test-suite (clavm, lencod,
and trimaran) pass.

llvm-svn: 288670
lld/ELF/Target.cpp
lld/test/ELF/aarch64-relocs.s