This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: nm -C no longer strips leading underscores?


On Mon, Jul 07, 2008 at 09:17:12PM +0930, Alan Modra wrote:
>On Tue, Jun 24, 2008 at 11:18:40PM -0400, Christopher Faylor wrote:
>> A Cygwin user has noticed that "nm -C" no longer removes the leading
>> underscore from symbols despite documentation to the contrary.
>> 
>> That behavior seems to have been caused by the introduction of the
>> bfd_demangle function which returns NULL when a symbol is not translated
>> by cplus_demangle rather than returning the symbol without the leading
>> underscore.
>> 
>> I think this is a bug
>[snip]
>
>Agreed.  If the name is demangled we remove bfd_symbol_leading_char,
>so I think bfd_demangle ought to always remove it.
>
>	* bfd.c (bfd_demangle): Always trim off bfd_get_symbol_leading_char.

That does seem to solve the problem.  Sorry for not submitting a patch
myself.  I wasn't sure if changing bfd_demangle would have a deletorious
effect on things besides "nm".

Thanks for the fix.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]