archive.c bfd_zalloc
authorAlan Modra <amodra@gmail.com>
Mon, 30 Dec 2019 01:18:20 +0000 (11:48 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 30 Dec 2019 02:59:24 +0000 (13:29 +1030)
commit6a89db5c9513d5e00e02b01095bf0c18e496dcc8
tree31cd8716958eb7acd9d9f07b43e0fb31f4ef0929
parent61b3df8f5b7c75e51a4fe45bc7e479b4b482a1cd
archive.c bfd_zalloc

Quite a few bfd_zalloc calls are wasting time clearing memory, and
should be bfd_alloc instead.

* archive.c (do_slurp_bsd_armap): Use bfd_alloc rather than
bfd_zalloc when memory is all written after the call.
(do_slurp_coff_armap): Likewise.  Set bfd_error on ridiculously
large allocations that overflow bfd_size_type.  Use just one
bfd_release on error exit.
(_bfd_slurp_extended_name_table): Use bfd_alloc for extended_names,
clear last byte rather than the entire array.  Use bfd_alloc for
string table.  Rearrange and simplify code copying file names.
bfd/ChangeLog
bfd/archive.c
This page took 0.026414 seconds and 4 git commands to generate.