From: Roland McGrath Date: Tue, 10 Mar 2009 03:42:56 +0000 (-0700) Subject: Fix RHBZ#489439: dwfl_module_build_id yields wrong vaddr for prelinked DSO X-Git-Tag: elfutils-0.141~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8651c5e5f977db488254cdeabb65ebc063be06a4;p=thirdparty%2Felfutils.git Fix RHBZ#489439: dwfl_module_build_id yields wrong vaddr for prelinked DSO --- diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 9633bb5d1..ef7182665 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,7 @@ +2009-03-09 Roland McGrath + + * relocate.c (__libdwfl_relocate_value): Add MOD->main.bias to sh_addr. + 2009-02-12 Roland McGrath * dwfl_module_build_id.c (__libdwfl_find_build_id): Use diff --git a/libdwfl/relocate.c b/libdwfl/relocate.c index abacc0410..ef1daeee9 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 @@ __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; }