`dlltool -l` doesn't remove a temporary file in case of an error. Illustration: $ ./dlltool -l /dev/null /dev/null dndibh.s: Assembler messages: dndibh.s:5: Error: cannot represent relocation type BFD_RELOC_RVA dndibh.s:10: Error: cannot represent relocation type BFD_RELOC_RVA dndibh.s:11: Error: cannot represent relocation type BFD_RELOC_RVA ./dlltool: as exited with status 1 ./dlltool: failed to open temporary head file: dndibh.o: No such file or directory $ ls *.s dndibh.s The same when a malformed regular file is used for input instead of /dev/null.
The master branch has been updated by Nick Clifton <nickc@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=81fb971a3d8626d7e051ff5df807442c8d233329 commit 81fb971a3d8626d7e051ff5df807442c8d233329 Author: Nick Clifton <nickc@redhat.com> Date: Thu Mar 5 15:13:08 2015 +0000 Fixes PR 17994 - which reported that dlltool was not deleting temporary files if it encounters a fatal error. PR binutils/17994 * dlltool.c (temp_file_to_remove): New local array. (unlink_temp_files): New functions - unlinks any file in the temp_file_to_remove array, unless dotdeltemps is set. (gen_exp_file): Add temp files to array. (make_head): Likewise. (make_delay_head): Likewise. (make_tail): Likewise. (gen_lib_file): Call unlink_temp_files.
Hi Alexander, Thanks for reporting this problem. I have checked in a patch to fix it. If you find any other ways to make dlltool leave a temporary file, please let me know via this PR. Cheers Nick