]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/coff-mcore.c
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / bfd / coff-mcore.c
index 5e3b7d4c791a37425138739dd03a41501fbec8ab..120064fa974807855556cf726540db28aaae9712 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for Motorola MCore COFF/PE
-   Copyright (C) 1999-2018 Free Software Foundation, Inc.
+   Copyright (C) 1999-2021 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -392,6 +392,7 @@ coff_mcore_relocate_section (bfd * output_bfd,
       reloc_howto_type *            howto = NULL;
       struct coff_link_hash_entry *  h;
       const char *                  my_name;
+      char buf[SYMNMLEN + 1];
 
       symndx = rel->r_symndx;
       loc = contents + rel->r_vaddr - input_section->vma;
@@ -436,8 +437,6 @@ coff_mcore_relocate_section (bfd * output_bfd,
                my_name = obj_coff_strings (input_bfd) + sym->_n._n_n._n_offset;
              else
                {
-                 static char buf [SYMNMLEN + 1];
-
                  strncpy (buf, sym->_n._n_name, SYMNMLEN);
                  buf[SYMNMLEN] = '\0';
                  my_name = buf;
@@ -470,7 +469,7 @@ coff_mcore_relocate_section (bfd * output_bfd,
        {
        default:
          /* xgettext: c-format */
-         _bfd_error_handler (_("%pB: unsupported relocation type 0x%02x"),
+         _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
                              input_bfd, r_type);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
@@ -478,10 +477,11 @@ coff_mcore_relocate_section (bfd * output_bfd,
        case IMAGE_REL_MCORE_ABSOLUTE:
          _bfd_error_handler
            /* xgettext: c-format */
-           (_("Warning: unsupported reloc %s <file %pB, section %pA>\n"
-              "sym %ld (%s), r_vaddr %Ld (%#Lx)"),
+           (_("warning: unsupported reloc %s <file %pB, section %pA>\n"
+              "sym %ld (%s), r_vaddr %" PRId64 " (%#" PRIx64 ")"),
             howto->name, input_bfd, input_section,
-            rel->r_symndx, my_name, rel->r_vaddr, rel->r_vaddr);
+            rel->r_symndx, my_name, (int64_t) rel->r_vaddr,
+            (uint64_t) rel->r_vaddr);
          break;
 
        case IMAGE_REL_MCORE_PCREL_IMM8BY4: