[PATCH] readelf: Don't allocate string with asprintf, but reuse buffer with sprintf.

Mark Wielaard mark@klomp.org
Wed Jun 6 20:37:00 GMT 2018

On Mon, Jun 04, 2018 at 07:05:16PM +0200, Mark Wielaard wrote:
> Since we are single threaded we can just use a static result buffer for
> format_dwarf_addr as long as we make sure to print the result before
> calling format_dwarf_addr again. This removes lots of malloc/free calls.
> On my machine eu-readelf -N --debug-dump=info libxul.so
> goes from 57 seconds to 55 seconds.

Pushed to master.

More information about the Elfutils-devel mailing list