]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR 33852 Different objects for same input
authorAlan Modra <amodra@gmail.com>
Wed, 28 Jan 2026 21:49:44 +0000 (08:19 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 28 Jan 2026 21:58:58 +0000 (08:28 +1030)
Testcase:
$ cat aff.s
 .quad x@ntpoff
$ gas/as-new -m64 aff.s -o t.o
with MALLOC_PERTURB_ this reliably shows uninitialised memory making
its way into the output.

R_390_TLS_LE64 howto was sized incorrectly, resulting in the
initialisation in s390_elf_cons zeroing only the first four bytes.

* elf64-s390.c (elf_howto_table <R_390_TLS_LE64>): Correct
size and bitsize.

bfd/elf64-s390.c

index b109ae3154ec1f9636389e56b78466260d6034fc..6f6c28bedcebd8c9ec9610b4e8bec6979bdcab72 100644 (file)
@@ -154,7 +154,7 @@ static reloc_howto_type elf_howto_table[] =
   HOWTO(R_390_TLS_IEENT, 1, 4, 32, true, 0, complain_overflow_bitfield,
        bfd_elf_generic_reloc, "R_390_TLS_IEENT", false, 0, MINUS_ONE, true),
   EMPTY_HOWTO (R_390_TLS_LE32),        /* Empty entry for R_390_TLS_LE32.  */
-  HOWTO(R_390_TLS_LE64,         0, 4, 32, false, 0, complain_overflow_bitfield,
+  HOWTO(R_390_TLS_LE64,         0, 8, 64, false, 0, complain_overflow_bitfield,
        bfd_elf_generic_reloc, "R_390_TLS_LE64", false, 0, MINUS_ONE, false),
   EMPTY_HOWTO (R_390_TLS_LDO32),       /* Empty entry for R_390_TLS_LDO32.  */
   HOWTO(R_390_TLS_LDO64, 0, 8, 64, false, 0, complain_overflow_bitfield,