From: Nick Clifton Date: Wed, 21 Nov 2007 11:58:00 +0000 (+0000) Subject: * dwarf.c (display_debug_loc): Issue a warning if there are bytes at the end X-Git-Tag: sid-snapshot-20071201~58 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=031cd65fb243f8dc3bddfa4a4862a710ff1afde7;p=external%2Fbinutils.git * dwarf.c (display_debug_loc): Issue a warning if there are bytes at the end of the .debug_loc section which are not referenced by any attribute in the .debug_info section. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 2747fbc..9b880a8 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2007-11-20 Nick Clifton + + * dwarf.c (display_debug_loc): Issue a warning if there are bytes + at the end of the .debug_loc section which are not referenced by + any attribute in the .debug_info section. + 2007-11-19 Nick Clifton * readelf.c (is_32bit_abs_reloc): Add support for NIOS relocs. diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 0e72d13..a673564 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -2624,6 +2624,10 @@ display_debug_loc (struct dwarf_section *section, void *file) } } } + + if (start < section_end) + warn (_("There are %ld unused bytes at the end of section %s\n"), + section_end - start, section->name); return 1; }