[binutils-gdb] PR 33852 Different objects for same input

Alan Modra amodra@sourceware.org
Wed Jan 28 21:59:56 GMT 2026


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0e245c72b774658c48a14b05d78a4e0943a8a9b1

commit 0e245c72b774658c48a14b05d78a4e0943a8a9b1
Author: Alan Modra <amodra@gmail.com>
Date:   Thu Jan 29 08:19:44 2026 +1030

    PR 33852 Different objects for same input
    
    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.

Diff:
---
 bfd/elf64-s390.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index b109ae3154e..6f6c28bedce 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -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,


More information about the Binutils-cvs mailing list