aboutsummaryrefslogtreecommitdiff
path: root/binutils/dwarf.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-04-04 12:53:33 +0100
committerNick Clifton <nickc@redhat.com>2016-04-04 12:53:33 +0100
commit67f101eece4327a7c9e13f257fe76f8082a5e336 (patch)
tree23720406c938c589efe15bdf8b1aa8f8e7e956a4 /binutils/dwarf.c
parent26cdfd92055ece05e1abb5248ddb78f3386f857b (diff)
downloadgdb-67f101eece4327a7c9e13f257fe76f8082a5e336.zip
gdb-67f101eece4327a7c9e13f257fe76f8082a5e336.tar.gz
gdb-67f101eece4327a7c9e13f257fe76f8082a5e336.tar.bz2
Ignore DWARF debug information with a version of 0 - assume that it is padding.
PR 19872 bfd * dwarf2.c (parse_comp_unit): Skip warning about unrecognised version number if the version is zero. bin * dwarf.c (display_debug_aranges): Skip warning about unrecognised version number if the version is zero.
Diffstat (limited to 'binutils/dwarf.c')
-rw-r--r--binutils/dwarf.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 086df4b..80f6b87 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -4910,7 +4910,12 @@ display_debug_aranges (struct dwarf_section *section,
if (arange.ar_version != 2 && arange.ar_version != 3)
{
- warn (_("Only DWARF 2 and 3 aranges are currently supported.\n"));
+ /* PR 19872: A version number of 0 probably means that there is
+ padding at the end of the .debug_aranges section. Gold puts
+ it there when performing an incremental link, for example.
+ So do not generate a warning in this case. */
+ if (arange.ar_version)
+ warn (_("Only DWARF 2 and 3 aranges are currently supported.\n"));
break;
}