From: Alan Modra Date: Wed, 8 Feb 2023 00:23:59 +0000 (+1030) Subject: Re: Resetting section vma after _bfd_dwarf2_find_nearest_line X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4170bc7ea846a14485e4729f1e2d707a04035c6f;p=binutils-gdb.git Re: Resetting section vma after _bfd_dwarf2_find_nearest_line f.bfd_ptr is set too early to be a reliable indicator of good debug info. * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Correct test for debug info being previously found. --- diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index ab5a9f37ec1..b16ae11e5f2 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -5382,7 +5382,7 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, { /* Check that we did previously find some debug information before attempting to make use of it. */ - if (stash->f.bfd_ptr != NULL) + if (stash->f.dwarf_info_size != 0) { if (do_place && !place_sections (abfd, stash)) return false;