diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 3d3f4cc..ec4cd4b 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -5066,9 +5066,9 @@ display_debug_ranges (struct dwarf_section *section, continue; } - if (dwarf_check != 0 && i > 0) + if (i > 0) { - if (start < next) + if (start < next && dwarf_check != 0) warn (_("There is a hole [0x%lx - 0x%lx] in %s section.\n"), (unsigned long) (start - section_begin), (unsigned long) (next - section_begin), section->name); @@ -5076,9 +5076,10 @@ display_debug_ranges (struct dwarf_section *section, { if (next == last_start) continue; - warn (_("There is an overlap [0x%lx - 0x%lx] in %s section.\n"), - (unsigned long) (start - section_begin), - (unsigned long) (next - section_begin), section->name); + if (dwarf_check != 0) + warn (_("There is an overlap [0x%lx - 0x%lx] in %s section.\n"), + (unsigned long) (start - section_begin), + (unsigned long) (next - section_begin), section->name); } } start = next;