From 8651c5e5f977db488254cdeabb65ebc063be06a4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 9 Mar 2009 20:42:56 -0700 Subject: [PATCH] Fix RHBZ#489439: dwfl_module_build_id yields wrong vaddr for prelinked DSO --- libdwfl/ChangeLog | 4 ++++ libdwfl/relocate.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) 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; } -- 2.47.2