[binutils-gdb] Correct R_MIPS_16 n32 howto

Alan Modra amodra@sourceware.org
Tue Jun 14 00:35:27 GMT 2022


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

commit 5f269b46201975658dc5f4218acc6d836fa12ab6
Author: Alan Modra <amodra@gmail.com>
Date:   Sat Jun 11 11:46:31 2022 +0930

    Correct R_MIPS_16 n32 howto
    
    If the howto is actually used, an all-zero dst_mask will result in
    unchanged section contents on attempting to apply R_MIPS_16.
    
            * elfn32-mips.c (elf_mips_howto_table_rela <R_MIPS_16>): Correct
            dst_mask.

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

diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c
index b74d25f12f7..2027230c651 100644
--- a/bfd/elfn32-mips.c
+++ b/bfd/elfn32-mips.c
@@ -901,7 +901,7 @@ static reloc_howto_type elf_mips_howto_table_rela[] =
 	 "R_MIPS_16",		/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0x0000,		/* dst_mask */
+	 0x0000ffff,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
   /* 32 bit relocation.  */


More information about the Binutils-cvs mailing list