• Siddhesh Poyarekar's avatar
    binutils: Use file descriptors from make_tempname · 365f5fb6
    Siddhesh Poyarekar authored
    The purpose of creating a temporary file securely using mkstemp is
    defeated if it is closed in make_tempname and reopened later for use;
    it is as good as using mktemp.  Get the file descriptor instead and
    then use it to create the BFD object.
    	* opncls.c (bfd_fdopenw): New function.
    	* bfd-in2.h: Regenerate.
    	* bucomm.c (make_tempname): Add argument to return file
    	* bucomm.h (make_tempname): Likewise.
    	* ar.c: Include libbfd.h.
    	(write_archive): Adjust for change in make_tempname.  Call
    	bfd_fdopenw instead of bfd_openw.
    	* objcopy.c: Include libbfd.h.
    	(copy_file): New argument OFD.  Use bfd_fdopenw instead of
    	(strip_main): Adjust for change in make_tempname and
    	(copy_main): Likewise.
To find the state of this project's repository at the time of any of these versions, check out the tags..
ChangeLog 65.8 KB