]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Bug compatibility wrapper for ELFUTILS_0.130 dwfl_module_build_id behavior.
authorRoland McGrath <roland@redhat.com>
Wed, 17 Dec 2008 00:21:40 +0000 (16:21 -0800)
committerRoland McGrath <roland@redhat.com>
Wed, 17 Dec 2008 00:21:40 +0000 (16:21 -0800)
libdw/libdw.map
libdwfl/ChangeLog
libdwfl/dwfl_module_build_id.c

index 8e2f6441b62cb828e136c29d8f238c5a58bd232b..eb3abc280429ea8b02988ebb609cbd63bca63b08 100644 (file)
@@ -185,3 +185,12 @@ ELFUTILS_0.136 {
   local:
     *;
 } ELFUTILS_0.130;
+
+ELFUTILS_0.138 {
+  global:
+    # Replaced ELFUTILS_0.130 version, which has bug-compatibility wrapper.
+    dwfl_module_build_id;
+
+  local:
+    *;
+} ELFUTILS_0.136;
index 9d86f52b489f302d6a506bb39d1a690fc4b68bc0..1ec9cf6757ccb8e22c5000d486c8d0d97e929b47 100644 (file)
@@ -1,3 +1,10 @@
+2008-12-16  Roland McGrath  <roland@redhat.com>
+
+       * dwfl_module_build_id.c (dwfl_module_build_id): Define with alias and
+       symver magic to bind to ELFUTILS_0.138.
+       (_BUG_COMPAT_dwfl_module_build_id): New function, bug compatible
+       wrapper for ELFUTILS_0.130 version set.
+
 2008-12-15  Roland McGrath  <roland@redhat.com>
 
        * derelocate.c (dwfl_module_relocate_address): Apply main.bias, not
index 8725afbccf20167255c503c1a2d73e46637aaee9..d1e0eb057c1050a9bc47977ef67e3fa2f6455ebf 100644 (file)
@@ -140,8 +140,8 @@ __libdwfl_find_build_id (Dwfl_Module *mod, bool set, Elf *elf)
 }
 
 int
-dwfl_module_build_id (Dwfl_Module *mod,
-                     const unsigned char **bits, GElf_Addr *vaddr)
+__dwfl_module_build_id (Dwfl_Module *mod,
+                       const unsigned char **bits, GElf_Addr *vaddr)
 {
   if (mod == NULL)
     return -1;
@@ -164,4 +164,19 @@ dwfl_module_build_id (Dwfl_Module *mod,
   *vaddr = mod->build_id_vaddr;
   return mod->build_id_len;
 }
-INTDEF (dwfl_module_build_id)
+extern __typeof__ (dwfl_module_build_id) INTUSE(dwfl_module_build_id)
+     __attribute__ ((alias ("__dwfl_module_build_id")));
+asm (".symver "
+     "__dwfl_module_build_id, dwfl_module_build_id@@ELFUTILS_0.138");
+
+int
+_BUG_COMPAT_dwfl_module_build_id (Dwfl_Module *mod,
+                                 const unsigned char **bits, GElf_Addr *vaddr)
+{
+  int result = INTUSE(dwfl_module_build_id) (mod, bits, vaddr);
+  if (result > 0)
+    *vaddr += (result + 3) & -4;
+  return result;
+}
+asm (".symver "
+     "_BUG_COMPAT_dwfl_module_build_id, dwfl_module_build_id@ELFUTILS_0.130");