]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
libdwfl: switch to DEBUGINFOD_SONAME, remove libdebuginfod.so fallback
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 9 Dec 2020 00:13:27 +0000 (03:13 +0300)
committerMark Wielaard <mark@klomp.org>
Wed, 9 Dec 2020 22:06:16 +0000 (23:06 +0100)
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
libdwfl/debuginfod-client.c

index f11abb80b09d9cdb93c846ec7bbc3c8e16f85b47..444e093c8de6269a092465300e45265dd48251a5 100644 (file)
@@ -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-12-01  Timm Bäder  <tbaeder@redhat.com>
 
        * link_map.c (dwfl_link_map_report): Removed consider_phdr function
index ee604ad9a85fb62f333aad4b4170e85f3100658a..99b66b6eedf4a8a06024b2bb89da4824847fcd4d 100644 (file)
@@ -101,10 +101,7 @@ __libdwfl_debuginfod_end (debuginfod_client *c)
 void __attribute__ ((constructor))
 __libdwfl_debuginfod_init (void)
 {
-  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)
     {