Skip to content

Commit

Permalink
Re: Resetting section vma after _bfd_dwarf2_find_nearest_line
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
amodra committed Feb 8, 2023
1 parent c9245f0 commit 4170bc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bfd/dwarf2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4170bc7

Please sign in to comment.