On Tue, 2019-06-18 at 13:50 +0200, Mark Wielaard wrote:
> Using ELF_C_WRITE_MMAP sometimes causes unexpected errors when disk
> space is low. When writing out the file, the output file is first
> extended so that it covers the whole file/mmap size. But it might
> be that the file system allowed the extension as a sparse file. In
> that case writing to the file through the mmap might still fail and
> produce a SIGBUS if the disk is full. This is confusing to the user.
> 
> Using ELF_C_WRITE will produce "normal" errors when the file cannot
> be written out. It also seems to use less memory because the debug
> file is created from scratch. So the memory is first read into the
> ELF data structure buffers, then written out as a whole. In this case
> the mmap output buffer is just overhead.

I pushed this to master.

Reply via email to