summaryrefslogtreecommitdiff
path: root/binutils/dwarf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2012-05-17 07:19:35 +0000
committerAlan Modra <amodra@bigpond.net.au>2012-05-17 07:19:35 +0000
commit3eee4ef7cb61540902ea39d5f48d2aca52a0f956 (patch)
tree3a26b22c1c9af1ace861237936434a6b711d1421 /binutils/dwarf.c
parent44dab1fa63f2f45d5f3d6b0eb56e5cc6c16ea659 (diff)
downloadbinutils-redhat-3eee4ef7cb61540902ea39d5f48d2aca52a0f956.tar.gz
* dwarf.c (display_debug_ranges): Don't report more than one use
of the same range set as an overlap.
Diffstat (limited to 'binutils/dwarf.c')
-rw-r--r--binutils/dwarf.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 2aca694949..54c94bcb1a 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -4419,6 +4419,7 @@ display_debug_ranges (struct dwarf_section *section,
void *file ATTRIBUTE_UNUSED)
{
unsigned char *start = section->start;
+ unsigned char *last_start = start;
unsigned long bytes;
unsigned char *section_begin = start;
unsigned int num_range_list, i;
@@ -4502,11 +4503,16 @@ display_debug_ranges (struct dwarf_section *section,
(unsigned long) (start - section_begin),
(unsigned long) (next - section_begin), section->name);
else if (start > next)
- 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 (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);
+ }
}
start = next;
+ last_start = next;
while (1)
{