PR23850, strip should not discard/move .rela.plt in executable
[binutils-gdb.git] / opcodes / hppa-dis.c
index 74d9ece9f8a487fc44ab2ce22733b8490df2378a..3658eec331b33228e5628949a6c00d012916f3a7 100644 (file)
@@ -1,6 +1,5 @@
 /* Disassembler for the PA-RISC. Somewhat derived from sparc-pinsn.c.
-   Copyright 1989, 1990, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2003,
-   2005, 2007  Free Software Foundation, Inc.
+   Copyright (C) 1989-2018 Free Software Foundation, Inc.
 
    Contributed by the Center for Software Science at the
    University of Utah (pa-gdb-bugs@cs.utah.edu).
@@ -23,7 +22,7 @@
    MA 02110-1301, USA.  */
 
 #include "sysdep.h"
-#include "dis-asm.h"
+#include "disassemble.h"
 #include "libhppa.h"
 #include "opcode/hppa.h"
 
@@ -176,13 +175,13 @@ static const char *const add_compl_names[] = { 0, "", ",l", ",tsv" };
 static void
 fput_reg (unsigned reg, disassemble_info *info)
 {
-  (*info->fprintf_func) (info->stream, reg ? reg_names[reg] : "r0");
+  (*info->fprintf_func) (info->stream, "%s", reg ? reg_names[reg] : "r0");
 }
 
 static void
 fput_fp_reg (unsigned reg, disassemble_info *info)
 {
-  (*info->fprintf_func) (info->stream, reg ? fp_reg_names[reg] : "fr0");
+  (*info->fprintf_func) (info->stream, "%s", reg ? fp_reg_names[reg] : "fr0");
 }
 
 static void
@@ -199,7 +198,7 @@ fput_fp_reg_r (unsigned reg, disassemble_info *info)
 static void
 fput_creg (unsigned reg, disassemble_info *info)
 {
-  (*info->fprintf_func) (info->stream, control_reg[reg]);
+  (*info->fprintf_func) (info->stream, "%s", control_reg[reg]);
 }
 
 /* Print constants with sign.  */
@@ -426,7 +425,7 @@ print_insn_hppa (bfd_vma memaddr, disassemble_info *info)
                        fput_fp_reg (GET_FIELD (insn, 6, 10), info);
                      break;
 
-                     /* 'fA' will not generate a space before the regsiter
+                     /* 'fA' will not generate a space before the register
                         name.  Normally that is fine.  Except that it
                         causes problems with xmpyu which has no FP format
                         completer.  */
@@ -1104,7 +1103,7 @@ print_insn_hppa (bfd_vma memaddr, disassemble_info *info)
                    int disp;
 
                    if (sign)
-                     disp = (-1 << 10) | imm10;
+                     disp = (-1U << 10) | imm10;
                    else
                      disp = imm10;
 
@@ -1120,7 +1119,7 @@ print_insn_hppa (bfd_vma memaddr, disassemble_info *info)
                    int disp;
 
                    if (sign)
-                     disp = (-1 << 11) | imm11;
+                     disp = (-1U << 11) | imm11;
                    else
                      disp = imm11;