Fix RHBZ#489439: dwfl_module_build_id yields wrong vaddr for prelinked DSO
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index 9633bb5..ef71826 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -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
diff --git a/libdwfl/relocate.c b/libdwfl/relocate.c
index abacc04..ef1daee 100644
--- a/libdwfl/relocate.c
+++ b/libdwfl/relocate.c
@@ -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 @@
}
/* Apply the adjustment. */
- *value += refshdr->sh_addr;
+ *value += refshdr->sh_addr + mod->main.bias;
return DWFL_E_NOERROR;
}