]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
bfd/aout: drop add_one_symbol() hook
authorJan Beulich <jbeulich@suse.com>
Mon, 14 Apr 2025 12:23:29 +0000 (14:23 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 14 Apr 2025 12:23:29 +0000 (14:23 +0200)
The need for this has disappeared with c65c21e1ffd1 ("various i386-aout
and i386-coff target removal"), with a few other users having got
removed just a few days earlier; avoid the unnecessary indirection.

bfd/aout-target.h
bfd/aoutx.h
bfd/i386aout.c
bfd/libaout.h
bfd/pdp11.c

index f513e1bb5587e17c9b40f04747134d39718e2408..1b711047f2887cb311e6bb6a0217f59337be97d8 100644 (file)
@@ -286,9 +286,6 @@ MY (set_sizes) (bfd *abfd)
 #ifndef MY_add_dynamic_symbols
 #define MY_add_dynamic_symbols 0
 #endif
-#ifndef MY_add_one_symbol
-#define MY_add_one_symbol 0
-#endif
 #ifndef MY_link_dynamic_object
 #define MY_link_dynamic_object 0
 #endif
@@ -312,7 +309,6 @@ static const struct aout_backend_data MY (backend_data) =
   MY_set_sizes,
   MY_exec_header_not_counted,
   MY_add_dynamic_symbols,
-  MY_add_one_symbol,
   MY_link_dynamic_object,
   MY_write_dynamic_symbol,
   MY_check_dynamic_reloc,
index 63c654faae4f8cae537a7d5eb93984b02689e53f..81e0804103901654364f3553c83d908c16e26551 100644 (file)
@@ -2973,9 +2973,6 @@ NAME (aout, link_hash_table_create) (bfd *abfd)
 static bool
 aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
 {
-  bool (*add_one_symbol)
-    (struct bfd_link_info *, bfd *, const char *, flagword, asection *,
-     bfd_vma, const char *, bool, bool, struct bfd_link_hash_entry **);
   struct external_nlist *syms;
   bfd_size_type sym_count;
   char *strings;
@@ -3013,10 +3010,6 @@ aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
     return false;
   obj_aout_sym_hashes (abfd) = sym_hash;
 
-  add_one_symbol = aout_backend_info (abfd)->add_one_symbol;
-  if (add_one_symbol == NULL)
-    add_one_symbol = _bfd_generic_link_add_one_symbol;
-
   p = syms;
   pend = p + sym_count;
   for (; p < pend; p++, sym_hash++)
@@ -3167,7 +3160,7 @@ aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
          break;
        }
 
-      if (! ((*add_one_symbol)
+      if (! (_bfd_generic_link_add_one_symbol
             (info, abfd, name, flags, section, value, string, copy, false,
              (struct bfd_link_hash_entry **) sym_hash)))
        return false;
index fb095974c1ee735c4527ae3e965242fb84253c2a..082ebfb59f573324d9639ed75f80829523f4cf04 100644 (file)
@@ -79,7 +79,6 @@ static const struct aout_backend_data MY (backend_data) =
   MY (set_sizes),
   1,                           /* Exec header not counted.  */
   0,                           /* Add_dynamic_symbols.  */
-  0,                           /* Add_one_symbol.  */
   0,                           /* Link_dynamic_object.  */
   0,                           /* Write_dynamic_symbol.  */
   0,                           /* Check_dynamic_reloc.  */
index ca4faec8ed6238e5f2d8bb859ff04414dcfe0f7c..7628d6a5114915a98112c755084ea9669c776585 100644 (file)
@@ -177,13 +177,6 @@ struct aout_backend_data
     (bfd *, struct bfd_link_info *, struct external_nlist **,
      bfd_size_type *, char **);
 
-  /* Callback from the add symbols phase of the linker code to handle
-     adding a single symbol to the global linker hash table.  */
-  bool (*add_one_symbol)
-    (struct bfd_link_info *, bfd *, const char *, flagword,
-     asection *, bfd_vma, const char *, bool, bool,
-     struct bfd_link_hash_entry **);
-
   /* Called to handle linking a dynamic object.  */
   bool (*link_dynamic_object)
     (struct bfd_link_info *, bfd *);
index bdd9fc27fbb767a282f8b07adffb4573845d2ab1..2d12033f08691d273a3426cf5a29e301d3678d64 100644 (file)
@@ -2839,9 +2839,6 @@ aout_link_check_archive_element (bfd *abfd,
 static bool
 aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
 {
-  bool (*add_one_symbol)
-    (struct bfd_link_info *, bfd *, const char *, flagword, asection *,
-     bfd_vma, const char *, bool, bool, struct bfd_link_hash_entry **);
   struct external_nlist *syms;
   bfd_size_type sym_count;
   char *strings;
@@ -2875,10 +2872,6 @@ aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
     return false;
   obj_aout_sym_hashes (abfd) = sym_hash;
 
-  add_one_symbol = aout_backend_info (abfd)->add_one_symbol;
-  if (add_one_symbol == NULL)
-    add_one_symbol = _bfd_generic_link_add_one_symbol;
-
   p = syms;
   pend = p + sym_count;
   for (; p < pend; p++, sym_hash++)
@@ -2951,7 +2944,7 @@ aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
          break;
        }
 
-      if (! ((*add_one_symbol)
+      if (! (_bfd_generic_link_add_one_symbol
             (info, abfd, name, flags, section, value, string, copy, false,
              (struct bfd_link_hash_entry **) sym_hash)))
        return false;