ld: Add -z separate-code tests to frame.exp
[deliverable/binutils-gdb.git] / bfd / cpu-arm.c
index 4f183364e062967e920be45f061768d67f617afb..151f27367feaad20d5f64f4130622ee93058c09a 100644 (file)
@@ -1,6 +1,5 @@
 /* BFD support for the ARM processor
-   Copyright 1994, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007,
-   2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 1994-2018 Free Software Foundation, Inc.
    Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -94,7 +93,8 @@ processors[] =
   { 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
@@ -129,19 +129,20 @@ scan (const struct bfd_arch_info *info, const char *string)
 
 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 =
@@ -187,6 +188,7 @@ bfd_arm_merge_machines (bfd *ibfd, bfd *obfd)
               || out == bfd_mach_arm_iWMMXt
               || out == bfd_mach_arm_iWMMXt2))
     {
+      /* xgettext: c-format */
       _bfd_error_handler (_("\
 error: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
                          ibfd, obfd);
@@ -198,6 +200,7 @@ error: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
               || in == bfd_mach_arm_iWMMXt
               || in == bfd_mach_arm_iWMMXt2))
     {
+      /* xgettext: c-format */
       _bfd_error_handler (_("\
 error: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
                          obfd, ibfd);
@@ -230,7 +233,7 @@ arm_check_note (bfd *abfd,
   unsigned long namesz;
   unsigned long descsz;
   unsigned long type;
-  char *        descr;
+  char *       descr;
 
   if (buffer_size < offsetof (arm_Note, name))
     return FALSE;
@@ -271,16 +274,16 @@ arm_check_note (bfd *abfd,
   return TRUE;
 }
 
-#define NOTE_ARCH_STRING       "arch: "
+#define NOTE_ARCH_STRING       "arch: "
 
 bfd_boolean
 bfd_arm_update_notes (bfd *abfd, const char *note_section)
 {
-  asection *     arm_arch_section;
-  bfd_size_type  buffer_size;
-  bfd_byte *     buffer;
-  char *         arch_string;
-  char *         expected;
+  asection *    arm_arch_section;
+  bfd_size_type         buffer_size;
+  bfd_byte *    buffer;
+  char *        arch_string;
+  char *        expected;
 
   /* Look for a note section.  If one is present check the architecture
      string encoded in it, and set it to the current architecture if it is
@@ -330,9 +333,10 @@ 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))
        {
-         (*_bfd_error_handler)
-           (_("warning: unable to update contents of %s section in %s"),
-            note_section, bfd_get_filename (abfd));
+         _bfd_error_handler
+           /* xgettext: c-format */
+           (_("warning: unable to update contents of %s section in %B"),
+            note_section, abfd);
          goto FAIL;
        }
     }
@@ -366,18 +370,19 @@ architectures[] =
   { "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.  */
 unsigned int
 bfd_arm_get_mach_from_notes (bfd *abfd, const char *note_section)
 {
-  asection *     arm_arch_section;
-  bfd_size_type  buffer_size;
-  bfd_byte *     buffer;
-  char *         arch_string;
-  int            i;
+  asection *    arm_arch_section;
+  bfd_size_type         buffer_size;
+  bfd_byte *    buffer;
+  char *        arch_string;
+  int           i;
 
   /* Look for a note section.  If one is present check the architecture
      string encoded in it, and set it to the current architecture if it is
This page took 0.025052 seconds and 4 git commands to generate.