This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] Cache the BFD file size for readonly input
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 28 Jun 2017 09:47:08 +0930
- Subject: Re: [PATCH] Cache the BFD file size for readonly input
- Authentication-results: sourceware.org; auth=none
- References: <20170627122734.GA5359@gmail.com>
On Tue, Jun 27, 2017 at 05:27:34AM -0700, H.J. Lu wrote:
> bfd_get_file_size may be called many times on the same input file with
> many sections. Cache the file size to avoid calling stat repeatedly
> for non-archive members.
> OK for master?
No. If you remove the use of bfd_get_file_size in the
get_section_contents functions then there is only one remaining use of
bfd_get_file_size, in objdump. So there is very little reason to
cache the result of bfd_get_file_size.
Australia Development Lab, IBM