[PATCH] readelf: Add -C/--demangle option.
Alan Modra
amodra@gmail.com
Mon Aug 3 01:49:09 GMT 2020
On Sun, Aug 02, 2020 at 03:04:10PM -0700, Fangrui Song via Binutils wrote:
> PR binutils/26331
> * readelf.c (print_symbol): Handle -C.
> (options): Add -C/--demangle option.
> (parse_args): Handle the option.
> * doc/binutils.texi: Document the -C option to readelf.
> * NEWS: Mention the new feature.
OK, but..
> + if (do_demangle)
> + {
> + alloc = cplus_demangle (symbol, demangle_flags);
> + if (alloc != NULL)
> + symbol = alloc;
> + }
this needs to go a little later, past the "return 0;" to avoid a
potential memory leak.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list