]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Fix RHBZ#489439: dwfl_module_build_id yields wrong vaddr for prelinked DSO
authorRoland McGrath <roland@redhat.com>
Tue, 10 Mar 2009 03:42:56 +0000 (20:42 -0700)
committerRoland McGrath <roland@redhat.com>
Tue, 10 Mar 2009 03:42:56 +0000 (20:42 -0700)
libdwfl/ChangeLog
libdwfl/relocate.c

index 9633bb5d1a55f723a4ea85ea28b72987f6a437a9..ef718266509498db52b45c9f0d62b41cbcd1cb68 100644 (file)
@@ -1,3 +1,7 @@
+2009-03-09  Roland McGrath  <roland@redhat.com>
+
+       * relocate.c (__libdwfl_relocate_value): Add MOD->main.bias to sh_addr.
+
 2009-02-12  Roland McGrath  <roland@redhat.com>
 
        * dwfl_module_build_id.c (__libdwfl_find_build_id): Use
index abacc0410a0e2237c8ee582465d1744ad127422d..ef1daeee94df7da9b4ce5e41a515e6556fb5f96d 100644 (file)
@@ -1,5 +1,5 @@
 /* Relocate debug information.
-   Copyright (C) 2005, 2006, 2007, 2008 Red Hat, Inc.
+   Copyright (C) 2005-2009 Red Hat, Inc.
    This file is part of Red Hat elfutils.
 
    Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -96,7 +96,7 @@ __libdwfl_relocate_value (Dwfl_Module *mod, Elf *elf, size_t *shstrndx,
     }
 
   /* Apply the adjustment.  */
-  *value += refshdr->sh_addr;
+  *value += refshdr->sh_addr + mod->main.bias;
   return DWFL_E_NOERROR;
 }