From 83ac53db400945c074e77ec9904efe550903a0e2 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Fri, 22 May 2009 08:40:25 +0200 Subject: [PATCH] Call reloc hook with the original address, not incremented --- libdw/libdwP.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libdw/libdwP.h b/libdw/libdwP.h index 720f1dbe2..9009a36f5 100644 --- a/libdw/libdwP.h +++ b/libdw/libdwP.h @@ -497,6 +497,7 @@ __libdw_in_section (Dwarf *dbg, int sec_index, if (!__libdw_in_section (dbg, sec_index, *addr, width)) \ return -1; \ \ + unsigned char *orig_addr = *addr; \ if (width == 4) \ VAL = read_4ubyte_unaligned_inc (dbg, *addr); \ else \ @@ -505,7 +506,7 @@ __libdw_in_section (Dwarf *dbg, int sec_index, VAL = read_8ubyte_unaligned_inc (dbg, *addr); \ } \ \ - int status = RELOC_HOOK (dbg, sec_index, *addr, width, &VAL); \ + int status = RELOC_HOOK (dbg, sec_index, orig_addr, width, &VAL); \ if (status < 0) \ return status; \ status > 0; \ -- 2.39.5