From 425bd9e1bb32b25881dd20d76678d041f7bf04f8 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 5 Mar 2015 12:14:26 +0000 Subject: Allows the binutils to cope with PE binaries where the section addresses have been changed, but the DWARF debug info has not been altered. PR binutils/18025 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2 lookup fails, check for an address bias in the dwarf info, and if one exists, retry the lookup with the biased value. * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function. Determines if a bias exists bewteen the addresses of functions based on DWARF information vs symbol table information. * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype. * libbfd.h: Regenerate. --- bfd/libbfd-in.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bfd/libbfd-in.h') diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h index 7c661e3479..06fa652e67 100644 --- a/bfd/libbfd-in.h +++ b/bfd/libbfd-in.h @@ -551,6 +551,10 @@ extern bfd_boolean _bfd_dwarf2_find_nearest_line const char **, const char **, unsigned int *, unsigned int *, const struct dwarf_debug_section *, unsigned int, void **); +/* Find the bias between DWARF addresses and real addresses. */ +extern bfd_signed_vma _bfd_dwarf2_find_symbol_bias + (asymbol **, void **); + /* Find inliner info after calling bfd_find_nearest_line. */ extern bfd_boolean _bfd_dwarf2_find_inliner_info (bfd *, const char **, const char **, unsigned int *, void **); -- cgit v1.2.3