[binutils-gdb] gdb/solib-svr4: remove svr4_have_link_map_offsets
Simon Marchi
simark@sourceware.org
Mon Jun 9 19:36:52 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5c42a6946cdb683340df92a77b1e0321ecb8e09a
commit 5c42a6946cdb683340df92a77b1e0321ecb8e09a
Author: Simon Marchi <simon.marchi@efficios.com>
Date: Thu Jun 5 15:18:43 2025 -0400
gdb/solib-svr4: remove svr4_have_link_map_offsets
While C++ifying the solib code, I concluded that all arches that use
SVR4 libraries do provide link map offsets, so I think this function is
unnecessary now.
Change-Id: Ifaae2560d92f658df3724def6219e2f89054e4b7
Approved-By: Tom Tromey <tom@tromey.com>
Diff:
---
gdb/solib-svr4.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index b7af602c333..48aace1feb4 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -48,7 +48,6 @@
#include <map>
static struct link_map_offsets *svr4_fetch_link_map_offsets (void);
-static int svr4_have_link_map_offsets (void);
static void svr4_relocate_main_executable (void);
static void probes_table_remove_objfile_probes (struct objfile *objfile);
static void svr4_iterate_over_objfiles_in_search_order
@@ -753,9 +752,6 @@ elf_locate_base (void)
{
CORE_ADDR dyn_ptr, dyn_ptr_addr;
- if (!svr4_have_link_map_offsets ())
- return 0;
-
/* Look for DT_MIPS_RLD_MAP first. MIPS executables use this
instead of DT_DEBUG, although they sometimes contain an unused
DT_DEBUG. */
@@ -3327,9 +3323,6 @@ svr4_solib_create_inferior_hook (int from_tty)
if (!target_has_execution ())
return;
- if (!svr4_have_link_map_offsets ())
- return;
-
if (!enable_break (info, from_tty))
return;
}
@@ -3528,17 +3521,6 @@ svr4_fetch_link_map_offsets (void)
return ops->fetch_link_map_offsets ();
}
-/* Return 1 if a link map offset fetcher has been defined, 0 otherwise. */
-
-static int
-svr4_have_link_map_offsets (void)
-{
- struct solib_svr4_ops *ops = get_ops (current_inferior ()->arch ());
-
- return (ops->fetch_link_map_offsets != NULL);
-}
-
-
/* Most OS'es that have SVR4-style ELF dynamic libraries define a
`struct r_debug' and a `struct link_map' that are binary compatible
with the original SVR4 implementation. */
More information about the Gdb-cvs
mailing list