summaryrefslogtreecommitdiffstats
path: root/tests/find-prologues.c
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2018-06-02 04:24:01 +0200
committerMark Wielaard <[email protected]>2018-06-04 19:03:18 +0200
commit608146eab9852cf2c9f077d0532688c13eb251a4 (patch)
tree5755c5ded94d20ee89ce9405798c10aaa7b04b06 /tests/find-prologues.c
parentbb5599d8085eb4bb186b711a8c16cea4334c70b4 (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 'tests/find-prologues.c')
0 files changed, 0 insertions, 0 deletions