]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
When elftoolchain's objcopy (or strip) is rewriting a file in-place,
authordim <dim@FreeBSD.org>
Wed, 18 Nov 2020 18:40:58 +0000 (18:40 +0000)
committerdim <dim@FreeBSD.org>
Wed, 18 Nov 2020 18:40:58 +0000 (18:40 +0000)
commite3622b0065999d06c134163ed7fbd9c0d658b9df
tree3f7e242becfb6954eb7d33c696788126b65d080c
parent141e99f3cb825ab42ec6eba5a40bf622210f2556
When elftoolchain's objcopy (or strip) is rewriting a file in-place,
make it create the temporary file in the same directory as the source
file by default, instead of always using $TMPDIR or /tmp. If creating
that file fails because the directory is not writable, also fallback to
$TMPDIR or /tmp.

This has also been submitted upstream as:
https://sourceforge.net/p/elftoolchain/tickets/597/

Reported by: cem
PR: 250872
MFC after: 2 weeks
contrib/elftoolchain/elfcopy/archive.c
contrib/elftoolchain/elfcopy/elfcopy.h
contrib/elftoolchain/elfcopy/main.c