Avoid symbol versioning unless building code for DSO.
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index f0b0a28..8f51ca7 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-23 Ulrich Drepper <drepper@redhat.com>
+
+ * dwfl_module_build_id.c: Define versioned symbols only if SHARED is
+ defined. Otherwise just define the latest version.
+
2009-04-22 Roland McGrath <roland@redhat.com>
* relocate.c (resolve_symbol): Apply correct bias to st_value found in
diff --git a/libdwfl/dwfl_module_build_id.c b/libdwfl/dwfl_module_build_id.c
index e1256db..d7bbb3c 100644
--- a/libdwfl/dwfl_module_build_id.c
+++ b/libdwfl/dwfl_module_build_id.c
@@ -174,6 +174,7 @@
*vaddr = mod->build_id_vaddr;
return mod->build_id_len;
}
+#ifdef SHARED
extern __typeof__ (dwfl_module_build_id) INTUSE(dwfl_module_build_id)
__attribute__ ((alias ("__dwfl_module_build_id")));
asm (".symver "
@@ -190,3 +191,7 @@
}
asm (".symver "
"_BUG_COMPAT_dwfl_module_build_id, dwfl_module_build_id@ELFUTILS_0.130");
+#else
+extern __typeof__ (dwfl_module_build_id) dwfl_module_build_id
+ __attribute__ ((alias ("__dwfl_module_build_id")));
+#endif