PATCH: Have readelf report unused bytes at the end of a .debug_loc section

Bobby McNulty snyder100@bellsouth.net
Wed Nov 21 13:55:00 GMT 2007


----- Original Message ----- 
From: "Nick Clifton" <nickc@redhat.com>
To: <binutils@sourceware.org>
Sent: Wednesday, November 21, 2007 5:57 AM
Subject: PATCH: Have readelf report unused bytes at the end of a .debug_loc 
section


> Hi Guys,
>
>  I am checking in the attached patch to add a warning message to
>  display_debug_loc() if it detects that there are unused bytes at the
>  end of the .debug_loc section.
>
> Cheers
>  Nick
>
> binutils/ChangeLog
> 2007-11-20  Nick Clifton  <nickc@redhat.com>
>
> * 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.
>
> Index: binutils/dwarf.c
> ===================================================================
> RCS file: /cvs/src/src/binutils/dwarf.c,v
> retrieving revision 1.20
> diff -c -3 -p -r1.20 dwarf.c
> *** binutils/dwarf.c 16 Nov 2007 15:36:21 -0000 1.20
> --- binutils/dwarf.c 21 Nov 2007 11:55:38 -0000
> *************** display_debug_loc (struct dwarf_section
> *** 2624,2629 ****
> --- 2624,2633 ----
>      }
>  }
>      }
> +
> +   if (start < section_end)
> +     warn (_("There are %ld unused bytes at the end of section %s\n"),
> +   section_end - start, section->name);
>    return 1;
>  }
>
that broke cygwin 1.5.24-2.
I am compiling cygwin 1.7.0 and installing it on Vista home premium. Will 
report back in about an hour.
bobby 



More information about the Binutils mailing list