diff options
| author | Mark Wielaard <[email protected]> | 2018-06-02 04:24:01 +0200 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2018-06-04 19:03:18 +0200 |
| commit | 608146eab9852cf2c9f077d0532688c13eb251a4 (patch) | |
| tree | 5755c5ded94d20ee89ce9405798c10aaa7b04b06 /backends/sparc_attrs.c | |
| parent | bb5599d8085eb4bb186b711a8c16cea4334c70b4 (diff) | |
readelf: Don't allocate string with asprintf, but reuse buffer with sprintf.
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.
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'backends/sparc_attrs.c')
0 files changed, 0 insertions, 0 deletions
