[PATCH v3 3/3] libdwfl: switch to DEBUGINFOD_SONAME, remove libdebuginfod.so fallback

Dmitry V. Levin ldv@altlinux.org
Wed Dec 9 00:13:27 GMT 2020


Since DEBUGINFOD_SONAME is as good as ("libdebuginfod-" VERSION ".so")
for dlopen, switch to use the name which is a part of the API.

Given that DEBUGINFOD_SONAME is always available now, remove the no longer
needed fall back to dlopen of "libdebuginfod.so".

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---
 libdwfl/ChangeLog           | 6 ++++++
 libdwfl/debuginfod-client.c | 5 +----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index 344db7c1..d0edc1a1 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,9 @@
+2020-12-08  Dmitry V. Levin  <ldv@altlinux.org>
+
+	* debuginfod-client.c (__libdwfl_debuginfod_init): Replace
+	"libdebuginfod-" VERSION ".so" with DEBUGINFOD_SONAME in dlopen call.
+	Do not fall back to dlopen of "libdebuginfod.so".
+
 2020-09-18  Mark Wielaard  <mark@klomp.org>
 
 	* zstd.c: New file.
diff --git a/libdwfl/debuginfod-client.c b/libdwfl/debuginfod-client.c
index 6fd83900..61d52db2 100644
--- a/libdwfl/debuginfod-client.c
+++ b/libdwfl/debuginfod-client.c
@@ -109,10 +109,7 @@ __libdwfl_debuginfod_init (void)
   if (urls_envvar == NULL || urls_envvar[0] == '\0')
     return;
 
-  void *debuginfod_so = dlopen("libdebuginfod-" VERSION ".so", RTLD_LAZY);
-
-  if (debuginfod_so == NULL)
-    debuginfod_so = dlopen("libdebuginfod.so", RTLD_LAZY);
+  void *debuginfod_so = dlopen(DEBUGINFOD_SONAME, RTLD_LAZY);
 
   if (debuginfod_so != NULL)
     {
-- 
ldv


More information about the Elfutils-devel mailing list