/* This relocation gets optimized away by the local exec
access optimization. */
BFD_ASSERT (! unresolved_reloc);
- bfd_put_32 (output_bfd, -tpoff (info, relocation),
+ bfd_put_32 (output_bfd, -tpoff (info, relocation) + rel->r_addend,
contents + rel->r_offset);
continue;
}
else
{
BFD_ASSERT (! unresolved_reloc);
- bfd_put_32 (output_bfd, -tpoff (info, relocation),
+ bfd_put_32 (output_bfd, -tpoff (info, relocation) + rel->r_addend,
contents + rel->r_offset);
}
continue;
/* This relocation gets optimized away by the local exec
access optimization. */
BFD_ASSERT (! unresolved_reloc);
- bfd_put_64 (output_bfd, -tpoff (info, relocation),
+ bfd_put_64 (output_bfd, -tpoff (info, relocation) + rel->r_addend,
contents + rel->r_offset);
continue;
}
else
{
BFD_ASSERT (! unresolved_reloc);
- bfd_put_64 (output_bfd, -tpoff (info, relocation),
+ bfd_put_64 (output_bfd, -tpoff (info, relocation) + rel->r_addend,
contents + rel->r_offset);
}
continue;
--- /dev/null
+#as: -m64 -mzarch -march=z900
+#ld: -m elf64_s390 -static
+#readelf: -x .data
+
+Hex dump of section '.data':
+ 0x[0-9a-f]+ ffffffff fffffff0 ffffffff fffffff8 ................
--- /dev/null
+ .text
+ .globl _start
+_start:
+ larl %r0,bar
+
+ .section .tbss,"awT",@nobits
+ .align 8
+foo: .zero 8
+ .zero 8
+
+ .data
+ .align 8
+ .quad foo@NTPOFF
+bar: .quad foo@NTPOFF+8