[binutils-gdb] Remove coff_symfile_init
Tom Tromey
tromey@sourceware.org
Tue Jan 20 15:52:53 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f0ea85e1691370996912ed9316bd6879fb9c681d
commit f0ea85e1691370996912ed9316bd6879fb9c681d
Author: Tom Tromey <tromey@adacore.com>
Date: Fri Jan 16 11:19:31 2026 -0700
Remove coff_symfile_init
coff_symfile_init is an empty function, and rather than give it a
name, just use a lambda in coff_sym_fns.
I've occasionally considered adding a do_nothing template function for
all our empty function needs, but still haven't bothered.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diff:
---
gdb/coffread.c | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/gdb/coffread.c b/gdb/coffread.c
index f9236736af9..9d580077cf6 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -184,22 +184,6 @@ record_minimal_symbol (minimal_symbol_reader &reader,
return reader.record_full (cs->c_name, true, address, type, section);
}
-/* coff_symfile_init ()
- is the coff-specific initialization routine for reading symbols.
- It is passed a struct objfile which contains, among other things,
- the BFD for the file whose symbols are being read, and a slot for
- a pointer to "private data" which we fill with cookies and other
- treats for coff_symfile_read ().
-
- We will only be called if this is a COFF or COFF-like file. BFD
- handles figuring out the format of the file, and code in symtab.c
- uses BFD's determination to vector to us. */
-
-static void
-coff_symfile_init (struct objfile *objfile)
-{
-}
-
/* A helper function for coff_symfile_read that reads minimal
symbols. It may also read other forms of symbol as well. */
@@ -643,7 +627,7 @@ getsymname (struct internal_syment *symbol_entry)
static const struct sym_fns coff_sym_fns =
{
- coff_symfile_init, /* sym_init: read initial info, setup
+ [] (objfile *) { }, /* sym_init: read initial info, setup
for sym_read() */
coff_symfile_read, /* sym_read: read a symbol file into
symtab */
More information about the Gdb-cvs
mailing list