gold patch committed: If file mmap fails, try anonymous mmap

Ian Lance Taylor
Tue Mar 24 18:05:00 GMT 2009

In some cases the file system does not support mmap of a file with
PROT_WRITE set.  Reportedly this happens on some FUSE file systems.  I
committed this gold patch from Elliott Hughes at Google to use an
anonymous mmap if the regular mmap fails.


2009-03-24  Elliott Hughes  <>

	* (Output_file::map_anonymous): Define.
	(Output_file::map): Use map_anonymous.  If the regular mmap fails,
	try an anonymous one.  Report the size if the mmap fails.
	* output.h (class Output_file): Declare map_anonymous.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-patch
Size: 2618 bytes
Desc: If file mmap fails, try anonymous mmap
URL: <>

More information about the Binutils mailing list