|
|
881b8e |
Backport of 44f814ce5066f10a3bed29c45d10e0d38f4fa433
|
|
|
881b8e |
|
|
|
881b8e |
+2014-04-15 Marcus Shawcroft <marcus.shawcroft@arm.com>
|
|
|
881b8e |
+
|
|
|
881b8e |
+ * (elfNN_aarch64_tls_relax): Fix instruction mask.
|
|
|
881b8e |
+
|
|
|
881b8e |
+2014-04-15 Marcus Shawcroft <marcus.shawcroft@arm.com>
|
|
|
881b8e |
+
|
|
|
881b8e |
+ * ld-aarch64/tls-relax-gdesc-ie.s (var): Adjust test case
|
|
|
881b8e |
+ to include all 5 bits of LDR destination register.
|
|
|
881b8e |
|
|
|
881b8e |
|
|
|
881b8e |
diff --git a/ld/testsuite/ld-aarch64/tls-relax-gdesc-ie.s b/ld/testsuite/ld-aarch64/tls-relax-gdesc-ie.s
|
|
|
881b8e |
index c20690c..38b3721 100644
|
|
|
881b8e |
--- a/ld/testsuite/ld-aarch64/tls-relax-gdesc-ie.s
|
|
|
881b8e |
+++ b/ld/testsuite/ld-aarch64/tls-relax-gdesc-ie.s
|
|
|
881b8e |
@@ -4,7 +4,7 @@ var:
|
|
|
881b8e |
.word 2
|
|
|
881b8e |
.text
|
|
|
881b8e |
adrp x0, :tlsdesc:var
|
|
|
881b8e |
- ldr x1, [x0, #:tlsdesc_lo12:var]
|
|
|
881b8e |
+ ldr x17, [x0, #:tlsdesc_lo12:var]
|
|
|
881b8e |
add x0, x0, :tlsdesc_lo12:var
|
|
|
881b8e |
.tlsdesccall var
|
|
|
881b8e |
blr x1
|
|
|
881b8e |
--- a/bfd/elf64-aarch64.c.orig 2014-04-16 15:27:40.768747791 -0400
|
|
|
881b8e |
+++ b/bfd/elf64-aarch64.c 2014-04-16 15:31:14.216712249 -0400
|
|
|
881b8e |
@@ -4171,7 +4171,7 @@ elf64_aarch64_tls_relax (struct elf64_aa
|
|
|
881b8e |
ldr xd, [x0, #:tlsdesc_lo12:var] => ldr x0, [x0, #:gottprel_lo12:var]
|
|
|
881b8e |
*/
|
|
|
881b8e |
insn = bfd_getl32 (contents + rel->r_offset);
|
|
|
881b8e |
- insn &= 0xfffffff0;
|
|
|
881b8e |
+ insn &= 0xffffffe0;
|
|
|
881b8e |
bfd_putl32 (insn, contents + rel->r_offset);
|
|
|
881b8e |
return bfd_reloc_continue;
|
|
|
881b8e |
}
|