[gold patch rfa] fix output after short writes

Chris Demetriou cgd@google.com
Fri Apr 24 06:34:00 GMT 2009


Elliott send this to me while discussing another issue.  Seems
nearly-obvious to me.

Tested by modifying tweaking gold to trigger the problem case: changed
Output_file::map to always use anonymous regions for output (to force
writes), and changed Output_file::close to call a fake write function
(instead of the real write function) that truncated large writes.

Ran the testsuite on gold tweaked as described above with this patch
(i686-linux), and then again on a copy of gold with *only* this patch.


chris
----
[gold/ChangeLog]
2008-04-23  Elliott Hughes  <enh@google.com>

        * output.cc (Output_file::close): After short writes, continue
        writing from the correct offset in the buffer being written.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: short_write.patch
Type: application/octet-stream
Size: 1314 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20090424/a2bc90f9/attachment.obj>


More information about the Binutils mailing list