[PATCH] Cache the BFD file size for readonly input

Alan Modra amodra@gmail.com
Wed Jun 28 00:17:00 GMT 2017


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.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list