From 4170bc7ea846a14485e4729f1e2d707a04035c6f Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 8 Feb 2023 10:53:59 +1030 Subject: [PATCH] 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. --- bfd/dwarf2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2