Skip to content
Commit f82ee0c8 authored by Alan Modra's avatar Alan Modra
Browse files

PR30724, cygwin ld performance regression since 014a602b

According to the reporter of this bug the newlib fseek implementation
is likely slowed down by locking and fflush, only attempting to
optimise seeks when the file is opened read-only.  Thus when writing
the output we get a dramatic slowdown due to commit 014a602b.

	PR 30724
	* bfd.c (enum bfd_last_io): New.
	(struct bfd): Add last_io field.
	* bfd-in2.h: Regenerate.
	* bfd-io.c (bfd_bread, bfd_bwrite): Force seek if last_io is
	opposite direction.
	(bfd_seek): Reinstate optimisation for seek to same position.
parent 7570a17c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment