]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gas: drop unused fields from struct emulation
authorJan Beulich <jbeulich@suse.com>
Fri, 4 Oct 2024 07:35:56 +0000 (09:35 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 4 Oct 2024 07:35:56 +0000 (09:35 +0200)
Neither .match not .bfd_name appear to ever have been used in the last
about 25 years. Purge them.

gas/as.c
gas/config/e-crisaout.c
gas/config/e-criself.c
gas/config/e-i386aout.c
gas/config/e-i386coff.c
gas/config/e-i386elf.c
gas/config/e-mipself.c
gas/emul-target.h
gas/emul.h

index 1b506f247db0d758cc745f9d1a6aaf2f7bd5ef0b..7117be21df3c217faf72c74d559eb6391ab9c63a 100644 (file)
--- a/gas/as.c
+++ b/gas/as.c
@@ -182,13 +182,6 @@ select_emulation_mode (int argc, char **argv)
   this_emulation->init ();
 }
 
-const char *
-default_emul_bfd_name (void)
-{
-  abort ();
-  return NULL;
-}
-
 void
 common_emul_init (void)
 {
index 4bd97ae5ad41ab77d8f5133dec70a3ebfd9f2e75..be2d1b08afa423c80f34b2c948652a5ce4f54f94 100644 (file)
 #include "as.h"
 #include "emul.h"
 
-static const char *crisaout_bfd_name (void);
-
-static const char *
-crisaout_bfd_name (void)
-{
-  abort ();
-  return NULL;
-}
-
-#define emul_bfd_name  crisaout_bfd_name
 #define emul_format    &aout_format_ops
 
 #define emul_name      "crisaout"
index 6998beead6e2555d1f7e38b2b7d583d64d76f912..713d8519e560c4e9764d317f298c771b939a1b49 100644 (file)
 #include "as.h"
 #include "emul.h"
 
-static const char *criself_bfd_name (void);
-
-static const char *
-criself_bfd_name (void)
-{
-  abort ();
-  return NULL;
-}
-
-#define emul_bfd_name  criself_bfd_name
 #define emul_format    &elf_format_ops
 
 #define emul_name      "criself"
index 723a5ac86cda9015d86199368cdb87305b0289ce..52f6fa543dd83dcd83027dff99a6931078e9ca91 100644 (file)
 #include "as.h"
 #include "emul.h"
 
-static const char *i386aout_bfd_name (void);
-
-static const char *
-i386aout_bfd_name (void)
-{
-  abort ();
-  return NULL;
-}
-
-#define emul_bfd_name  i386aout_bfd_name
 #define emul_format    &aout_format_ops
 
 #define emul_name      "i386aout"
index 62e8631c1b595f89a4a19fbe2da388ddcbf98f57..f767a13ea6a7261e66b4eb2524d81faa25d6019e 100644 (file)
 #include "as.h"
 #include "emul.h"
 
-static const char *i386coff_bfd_name (void);
-
-static const char *
-i386coff_bfd_name (void)
-{
-  abort ();
-  return NULL;
-}
-
-#define emul_bfd_name  i386coff_bfd_name
 #define emul_format    &coff_format_ops
 
 #define emul_name      "i386coff"
index 99850e3aa2595fdd8e594fc13e8acbe666ac2cac..5a6ed4ba4088563568d41ff5d94d4340e6083bdf 100644 (file)
 #include "as.h"
 #include "emul.h"
 
-static const char *i386elf_bfd_name (void);
-
-static const char *
-i386elf_bfd_name (void)
-{
-  abort ();
-  return NULL;
-}
-
-#define emul_bfd_name  i386elf_bfd_name
 #define emul_format    &elf_format_ops
 
 #define emul_name      "i386elf"
index 42c9e7c439e334e90f96921f552530b37695f138..ed38444172923b893ea9823efe6e3021aaa47079 100644 (file)
 #include "as.h"
 #include "emul.h"
 
-static const char *mipself_bfd_name (void);
-
-static const char *
-mipself_bfd_name (void)
-{
-  abort ();
-  return NULL;
-}
-
-#define emul_bfd_name  mipself_bfd_name
 #define emul_format    &elf_format_ops
 
 #define emul_name      "mipsbelf"
index d38e121a8f6be193353311eb3c6847f1f256c87a..6b6064a031ec40a35b629d3499249fee64eaac15 100644 (file)
 #define emul_init                      common_emul_init
 #endif
 
-#ifndef emul_bfd_name
-#define emul_bfd_name                  default_emul_bfd_name
-#endif
-
 #ifndef emul_local_labels_fb
 #define emul_local_labels_fb           0
 #endif
 
 struct emulation emul_struct_name =
   {
-    0,
     emul_name,
     emul_init,
-    emul_bfd_name,
     emul_local_labels_fb, emul_local_labels_dollar,
     emul_leading_underscore,
     emul_default_endian,
index 635dbfd65629063f0f5f0938f281803062ee82dd..d4c3f062898bf4ab4e9b07bb2e0527fee82a34a2 100644 (file)
 
 struct emulation
   {
-    void (*                   match) (const char *);
     const char *              name;
     void (*                   init) (void);
-    const char *(*            bfd_name) (void);
     unsigned                  local_labels_fb : 1;
     unsigned                  local_labels_dollar : 1;
     unsigned                  leading_underscore : 2;
@@ -37,7 +35,6 @@ struct emulation
 
 COMMON struct emulation * this_emulation;
 
-extern const char * default_emul_bfd_name (void);
 extern void common_emul_init (void);
 
 #endif