public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Remove unused args from bfd_make_debug_symbol
@ 2023-05-03  6:34 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2023-05-03  6:34 UTC (permalink / raw)
  To: binutils

The ptr and size args are unused.  Make the function look the same as
bfd_make_empty_symbol.

diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index a5a9f1c3be0..7be18db20a8 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1280,8 +1280,8 @@ void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
 
 asymbol *_bfd_generic_make_empty_symbol (bfd *);
 
-#define bfd_make_debug_symbol(abfd,ptr,size) \
-       BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
+#define bfd_make_debug_symbol(abfd) \
+       BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd))
 
 int bfd_decode_symclass (asymbol *symbol);
 
@@ -7655,7 +7655,7 @@ typedef struct bfd_target
     while using BFD for everything else.  Currently used by the assembler
     when creating COFF files.  */
   asymbol *
-       (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size);
+       (*_bfd_make_debug_symbol) (bfd *);
 #define bfd_read_minisymbols(b, d, m, s) \
        BFD_SEND (b, _read_minisymbols, (b, d, m, s))
   long (*_read_minisymbols) (bfd *, bool, void **, unsigned int *);
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index 05f2640abe2..ac936def566 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -1991,9 +1991,7 @@ coff_make_empty_symbol (bfd *abfd)
 /* Make a debugging symbol.  */
 
 asymbol *
-coff_bfd_make_debug_symbol (bfd *abfd,
-			    void * ptr ATTRIBUTE_UNUSED,
-			    unsigned long sz ATTRIBUTE_UNUSED)
+coff_bfd_make_debug_symbol (bfd *abfd)
 {
   size_t amt = sizeof (coff_symbol_type);
   coff_symbol_type *new_symbol = (coff_symbol_type *) bfd_alloc (abfd, amt);
diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h
index b3f5190e370..07ef59a24e1 100644
--- a/bfd/libbfd-in.h
+++ b/bfd/libbfd-in.h
@@ -450,7 +450,7 @@ extern bool _bfd_nosymbols_find_line
 extern bool _bfd_nosymbols_find_inliner_info
   (bfd *, const char **, const char **, unsigned int *) ATTRIBUTE_HIDDEN;
 extern asymbol *_bfd_nosymbols_bfd_make_debug_symbol
-  (bfd *, void *, unsigned long) ATTRIBUTE_HIDDEN;
+  (bfd *) ATTRIBUTE_HIDDEN;
 extern long _bfd_nosymbols_read_minisymbols
   (bfd *, bool, void **, unsigned int *) ATTRIBUTE_HIDDEN;
 extern asymbol *_bfd_nosymbols_minisymbol_to_symbol
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index f56f2b81305..05508c986ad 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -456,7 +456,7 @@ extern bool _bfd_nosymbols_find_line
 extern bool _bfd_nosymbols_find_inliner_info
   (bfd *, const char **, const char **, unsigned int *) ATTRIBUTE_HIDDEN;
 extern asymbol *_bfd_nosymbols_bfd_make_debug_symbol
-  (bfd *, void *, unsigned long) ATTRIBUTE_HIDDEN;
+  (bfd *) ATTRIBUTE_HIDDEN;
 extern long _bfd_nosymbols_read_minisymbols
   (bfd *, bool, void **, unsigned int *) ATTRIBUTE_HIDDEN;
 extern asymbol *_bfd_nosymbols_minisymbol_to_symbol
diff --git a/bfd/libcoff-in.h b/bfd/libcoff-in.h
index a0d286d37f4..d0839c76e96 100644
--- a/bfd/libcoff-in.h
+++ b/bfd/libcoff-in.h
@@ -360,7 +360,7 @@ extern void coff_get_symbol_info
 extern bool _bfd_coff_is_local_label_name
   (bfd *, const char *);
 extern asymbol *coff_bfd_make_debug_symbol
-  (bfd *, void *, unsigned long);
+  (bfd *);
 extern bool coff_find_nearest_line
   (bfd *, asymbol **, asection *, bfd_vma,
    const char **, const char **, unsigned int *, unsigned int *);
diff --git a/bfd/libcoff.h b/bfd/libcoff.h
index 12bd75856c3..235d5c3c843 100644
--- a/bfd/libcoff.h
+++ b/bfd/libcoff.h
@@ -364,7 +364,7 @@ extern void coff_get_symbol_info
 extern bool _bfd_coff_is_local_label_name
   (bfd *, const char *);
 extern asymbol *coff_bfd_make_debug_symbol
-  (bfd *, void *, unsigned long);
+  (bfd *);
 extern bool coff_find_nearest_line
   (bfd *, asymbol **, asection *, bfd_vma,
    const char **, const char **, unsigned int *, unsigned int *);
diff --git a/bfd/syms.c b/bfd/syms.c
index 57ac52f8faa..6979096fbc6 100644
--- a/bfd/syms.c
+++ b/bfd/syms.c
@@ -569,11 +569,10 @@ FUNCTION
 
 DESCRIPTION
 	Create a new <<asymbol>> structure for the BFD @var{abfd},
-	to be used as a debugging symbol.  Further details of its use have
-	yet to be worked out.
+	to be used as a debugging symbol.
 
-.#define bfd_make_debug_symbol(abfd,ptr,size) \
-.	BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
+.#define bfd_make_debug_symbol(abfd) \
+.	BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd))
 .
 */
 
@@ -1577,9 +1576,7 @@ _bfd_nosymbols_find_inliner_info
 }
 
 asymbol *
-_bfd_nosymbols_bfd_make_debug_symbol (bfd *abfd,
-				      void *ptr ATTRIBUTE_UNUSED,
-				      unsigned long sz ATTRIBUTE_UNUSED)
+_bfd_nosymbols_bfd_make_debug_symbol (bfd *abfd)
 {
   return (asymbol *) _bfd_ptr_bfd_null_error (abfd);
 }
diff --git a/bfd/targets.c b/bfd/targets.c
index 021c808f62d..3dbcd088966 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -420,7 +420,7 @@ BFD_JUMP_TABLE macros.
 .    while using BFD for everything else.  Currently used by the assembler
 .    when creating COFF files.  *}
 .  asymbol *
-.	(*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size);
+.	(*_bfd_make_debug_symbol) (bfd *);
 .#define bfd_read_minisymbols(b, d, m, s) \
 .	BFD_SEND (b, _read_minisymbols, (b, d, m, s))
 .  long	(*_read_minisymbols) (bfd *, bool, void **, unsigned int *);
diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c
index 465a990ec88..6216b1f63ee 100644
--- a/gas/config/obj-coff.c
+++ b/gas/config/obj-coff.c
@@ -238,7 +238,7 @@ fetch_coff_debug_section (void)
     {
       const asymbol *s;
 
-      s = bfd_make_debug_symbol (stdoutput, NULL, 0);
+      s = bfd_make_debug_symbol (stdoutput);
       gas_assert (s != 0);
       debug_section = s->section;
     }

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-05-03  6:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-03  6:34 Remove unused args from bfd_make_debug_symbol Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).