DWARF-5: call sites
[deliverable/binutils-gdb.git] / bfd / cpu-arm.c
index 52c359b8cc3005110edbb6d7529e348d49b33165..80bd29687d73fdf452a869b09cc4059b14eb73d8 100644 (file)
@@ -1,13 +1,12 @@
 /* BFD support for the ARM processor
 /* BFD support for the ARM processor
-   Copyright 1994, 1997, 1999, 2000, 2002, 2003, 2004, 2005
-   Free Software Foundation, Inc.
+   Copyright (C) 1994-2017 Free Software Foundation, Inc.
    Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
 
    This file is part of BFD, the Binary File Descriptor library.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
 
    This file is part of BFD, the Binary File Descriptor library.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 
-#include "bfd.h"
 #include "sysdep.h"
 #include "sysdep.h"
+#include "bfd.h"
 #include "libbfd.h"
 #include "libiberty.h"
 
 #include "libbfd.h"
 #include "libiberty.h"
 
@@ -93,7 +93,8 @@ processors[] =
   { bfd_mach_arm_XScale, "xscale" },
   { bfd_mach_arm_ep9312, "ep9312" },
   { bfd_mach_arm_iWMMXt, "iwmmxt" },
   { bfd_mach_arm_XScale, "xscale" },
   { bfd_mach_arm_ep9312, "ep9312" },
   { bfd_mach_arm_iWMMXt, "iwmmxt" },
-  { bfd_mach_arm_iWMMXt2, "iwmmxt2" }
+  { bfd_mach_arm_iWMMXt2, "iwmmxt2" },
+  { bfd_mach_arm_unknown, "arm_any" }
 };
 
 static bfd_boolean
 };
 
 static bfd_boolean
@@ -123,23 +124,25 @@ scan (const struct bfd_arch_info *info, const char *string)
 }
 
 #define N(number, print, default, next)  \
 }
 
 #define N(number, print, default, next)  \
-{  32, 32, 8, bfd_arch_arm, number, "arm", print, 4, default, compatible, scan, next }
+{  32, 32, 8, bfd_arch_arm, number, "arm", print, 4, default, compatible, \
+   scan, bfd_arch_default_fill, next }
 
 static const bfd_arch_info_type arch_info_struct[] =
 {
 
 static const bfd_arch_info_type arch_info_struct[] =
 {
-  N (bfd_mach_arm_2,      "armv2",   FALSE, & arch_info_struct[1]),
-  N (bfd_mach_arm_2a,     "armv2a",  FALSE, & arch_info_struct[2]),
-  N (bfd_mach_arm_3,      "armv3",   FALSE, & arch_info_struct[3]),
-  N (bfd_mach_arm_3M,     "armv3m",  FALSE, & arch_info_struct[4]),
-  N (bfd_mach_arm_4,      "armv4",   FALSE, & arch_info_struct[5]),
-  N (bfd_mach_arm_4T,     "armv4t",  FALSE, & arch_info_struct[6]),
-  N (bfd_mach_arm_5,      "armv5",   FALSE, & arch_info_struct[7]),
-  N (bfd_mach_arm_5T,     "armv5t",  FALSE, & arch_info_struct[8]),
-  N (bfd_mach_arm_5TE,    "armv5te", FALSE, & arch_info_struct[9]),
-  N (bfd_mach_arm_XScale, "xscale",  FALSE, & arch_info_struct[10]),
-  N (bfd_mach_arm_ep9312, "ep9312",  FALSE, & arch_info_struct[11]),
-  N (bfd_mach_arm_iWMMXt, "iwmmxt",  FALSE, & arch_info_struct[12]),
-  N (bfd_mach_arm_iWMMXt2, "iwmmxt2", FALSE, NULL)
+  N (bfd_mach_arm_2,       "armv2",   FALSE, & arch_info_struct[1]),
+  N (bfd_mach_arm_2a,      "armv2a",  FALSE, & arch_info_struct[2]),
+  N (bfd_mach_arm_3,       "armv3",   FALSE, & arch_info_struct[3]),
+  N (bfd_mach_arm_3M,      "armv3m",  FALSE, & arch_info_struct[4]),
+  N (bfd_mach_arm_4,       "armv4",   FALSE, & arch_info_struct[5]),
+  N (bfd_mach_arm_4T,      "armv4t",  FALSE, & arch_info_struct[6]),
+  N (bfd_mach_arm_5,       "armv5",   FALSE, & arch_info_struct[7]),
+  N (bfd_mach_arm_5T,      "armv5t",  FALSE, & arch_info_struct[8]),
+  N (bfd_mach_arm_5TE,     "armv5te", FALSE, & arch_info_struct[9]),
+  N (bfd_mach_arm_XScale,  "xscale",  FALSE, & arch_info_struct[10]),
+  N (bfd_mach_arm_ep9312,  "ep9312",  FALSE, & arch_info_struct[11]),
+  N (bfd_mach_arm_iWMMXt,  "iwmmxt",  FALSE, & arch_info_struct[12]),
+  N (bfd_mach_arm_iWMMXt2, "iwmmxt2", FALSE, & arch_info_struct[13]),
+  N (bfd_mach_arm_unknown, "arm_any", FALSE, NULL)
 };
 
 const bfd_arch_info_type bfd_arm_arch =
 };
 
 const bfd_arch_info_type bfd_arm_arch =
@@ -185,8 +188,9 @@ bfd_arm_merge_machines (bfd *ibfd, bfd *obfd)
               || out == bfd_mach_arm_iWMMXt
               || out == bfd_mach_arm_iWMMXt2))
     {
               || out == bfd_mach_arm_iWMMXt
               || out == bfd_mach_arm_iWMMXt2))
     {
+      /* xgettext: c-format */
       _bfd_error_handler (_("\
       _bfd_error_handler (_("\
-ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
+error: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
                          ibfd, obfd);
       bfd_set_error (bfd_error_wrong_format);
       return FALSE;
                          ibfd, obfd);
       bfd_set_error (bfd_error_wrong_format);
       return FALSE;
@@ -196,8 +200,9 @@ ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
               || in == bfd_mach_arm_iWMMXt
               || in == bfd_mach_arm_iWMMXt2))
     {
               || in == bfd_mach_arm_iWMMXt
               || in == bfd_mach_arm_iWMMXt2))
     {
+      /* xgettext: c-format */
       _bfd_error_handler (_("\
       _bfd_error_handler (_("\
-ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
+error: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
                          obfd, ibfd);
       bfd_set_error (bfd_error_wrong_format);
       return FALSE;
                          obfd, ibfd);
       bfd_set_error (bfd_error_wrong_format);
       return FALSE;
@@ -250,10 +255,10 @@ arm_check_note (bfd *abfd,
        return FALSE;
     }
   else
        return FALSE;
     }
   else
-    { 
+    {
       if (namesz != ((strlen (expected_name) + 1 + 3) & ~3))
        return FALSE;
       if (namesz != ((strlen (expected_name) + 1 + 3) & ~3))
        return FALSE;
-      
+
       if (strcmp (descr, expected_name) != 0)
        return FALSE;
 
       if (strcmp (descr, expected_name) != 0)
        return FALSE;
 
@@ -261,6 +266,7 @@ arm_check_note (bfd *abfd,
     }
 
   /* FIXME: We should probably check the type as well.  */
     }
 
   /* FIXME: We should probably check the type as well.  */
+  (void) type;
 
   if (description_return != NULL)
     * description_return = descr;
 
   if (description_return != NULL)
     * description_return = descr;
@@ -327,7 +333,8 @@ bfd_arm_update_notes (bfd *abfd, const char *note_section)
       if (! bfd_set_section_contents (abfd, arm_arch_section, buffer,
                                      (file_ptr) 0, buffer_size))
        {
       if (! bfd_set_section_contents (abfd, arm_arch_section, buffer,
                                      (file_ptr) 0, buffer_size))
        {
-         (*_bfd_error_handler)
+         _bfd_error_handler
+           /* xgettext: c-format */
            (_("warning: unable to update contents of %s section in %s"),
             note_section, bfd_get_filename (abfd));
          goto FAIL;
            (_("warning: unable to update contents of %s section in %s"),
             note_section, bfd_get_filename (abfd));
          goto FAIL;
@@ -363,7 +370,8 @@ architectures[] =
   { "XScale",  bfd_mach_arm_XScale },
   { "ep9312",  bfd_mach_arm_ep9312 },
   { "iWMMXt",  bfd_mach_arm_iWMMXt },
   { "XScale",  bfd_mach_arm_XScale },
   { "ep9312",  bfd_mach_arm_ep9312 },
   { "iWMMXt",  bfd_mach_arm_iWMMXt },
-  { "iWMMXt2", bfd_mach_arm_iWMMXt2 }
+  { "iWMMXt2", bfd_mach_arm_iWMMXt2 },
+  { "arm_any", bfd_mach_arm_unknown }
 };
 
 /* Extract the machine number stored in a note section.  */
 };
 
 /* Extract the machine number stored in a note section.  */
This page took 0.030723 seconds and 4 git commands to generate.