summaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-08-17 23:00:38 +0000
committerNick Clifton <nickc@redhat.com>2000-08-17 23:00:38 +0000
commit3f215a10930f7d2cd7dc76f6a0b51bd405ae1a7d (patch)
tree80c5f130df9ae1c7b736b167341ef87a9f1de857 /binutils/readelf.c
parentd7b325206ecdbc091e32a7a4df3f3f674c77f861 (diff)
downloadbinutils-gdb-3f215a10930f7d2cd7dc76f6a0b51bd405ae1a7d.tar.gz
Catch and warn about attempts to display debug information for version 1 aranges.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r--binutils/readelf.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index c211d1e872b..4bb4cbd4360 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -5225,7 +5225,14 @@ display_debug_pubnames (section, start, file)
if (pubnames.pn_version != 2)
{
- warn (_("Only DWARF 2 pubnames are currently supported"));
+ static int warned = 0;
+
+ if (! warned)
+ {
+ warn (_("Only DWARF 2 pubnames are currently supported\n"));
+ warned = 1;
+ }
+
continue;
}
@@ -6397,6 +6404,12 @@ display_debug_aranges (section, start, file)
arange.ar_pointer_size = BYTE_GET (external->ar_pointer_size);
arange.ar_segment_size = BYTE_GET (external->ar_segment_size);
+ if (arange.ar_version != 2)
+ {
+ warn (_("Only DWARF 2 aranges are currently supported.\n"));
+ break;
+ }
+
printf (_(" Length: %ld\n"), arange.ar_length);
printf (_(" Version: %d\n"), arange.ar_version);
printf (_(" Offset into .debug_info: %lx\n"), arange.ar_info_offset);