svn commit: r316748 - stable/11/contrib/elftoolchain/elfcopy
Ed Maste
emaste at FreeBSD.org
Thu Apr 13 01:36:52 UTC 2017
Author: emaste
Date: Thu Apr 13 01:36:51 2017
New Revision: 316748
URL: https://svnweb.freebsd.org/changeset/base/316748
Log:
MFC r316284: elfcopy: remove temporary ELF file when converting from binary
Previously a command like
objcopy --input-target binary --output-target elf64-x86-64-freebsd \
binary_file object.o
would leave a temporary file behind.
ELF Tool Chain ticket #543
Modified:
stable/11/contrib/elftoolchain/elfcopy/main.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/contrib/elftoolchain/elfcopy/main.c
==============================================================================
--- stable/11/contrib/elftoolchain/elfcopy/main.c Thu Apr 13 01:17:49 2017 (r316747)
+++ stable/11/contrib/elftoolchain/elfcopy/main.c Thu Apr 13 01:36:51 2017 (r316748)
@@ -674,6 +674,8 @@ create_file(struct elfcopy *ecp, const c
if ((ifd = open(elftemp, O_RDONLY)) == -1)
err(EXIT_FAILURE, "open %s failed", src);
close(efd);
+ if (unlink(elftemp) < 0)
+ err(EXIT_FAILURE, "unlink %s failed", elftemp);
free(elftemp);
}
More information about the svn-src-stable-11
mailing list