]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
MIPS/BFD: Fix rightshift for remaining n32 reloc howtos master
authorMaciej W. Rozycki <macro@orcam.me.uk>
Mon, 6 Oct 2025 20:37:28 +0000 (21:37 +0100)
committerMaciej W. Rozycki <macro@orcam.me.uk>
Mon, 6 Oct 2025 20:37:28 +0000 (21:37 +0100)
Correct the rightshift amount for the R_MIPS_HIGHER, R_MIPS_HIGHEST and
R_MIPS_CALL_HI16 RELA relocation howtos, missed with commit f38e9921479a
("MIPS HI16 and LO16 reloc howtos").

bfd/elfn32-mips.c

index 07e222cd4bf8cbda9c7b2498c83ca89ce1bbdaab..7c9967268c03f49f2631a28184c07375fcb9174a 100644 (file)
@@ -1264,7 +1264,7 @@ static reloc_howto_type elf_mips_howto_table_rela[] =
 
   /* Get the higher value of a 64 bit addend.  */
   HOWTO (R_MIPS_HIGHER,                /* type */
-        0,                     /* rightshift */
+        32,                    /* rightshift */
         4,                     /* size */
         16,                    /* bitsize */
         false,                 /* pc_relative */
@@ -1279,7 +1279,7 @@ static reloc_howto_type elf_mips_howto_table_rela[] =
 
   /* Get the highest value of a 64 bit addend.  */
   HOWTO (R_MIPS_HIGHEST,       /* type */
-        0,                     /* rightshift */
+        48,                    /* rightshift */
         4,                     /* size */
         16,                    /* bitsize */
         false,                 /* pc_relative */
@@ -1294,7 +1294,7 @@ static reloc_howto_type elf_mips_howto_table_rela[] =
 
   /* High 16 bits of displacement in global offset table.  */
   HOWTO (R_MIPS_CALL_HI16,     /* type */
-        0,                     /* rightshift */
+        16,                    /* rightshift */
         4,                     /* size */
         16,                    /* bitsize */
         false,                 /* pc_relative */