]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
When elftoolchain's objcopy (or strip) is rewriting a file in-place,
authorDimitry Andric <dim@FreeBSD.org>
Wed, 18 Nov 2020 18:40:58 +0000 (18:40 +0000)
committerDimitry Andric <dim@FreeBSD.org>
Wed, 18 Nov 2020 18:40:58 +0000 (18:40 +0000)
commit1e4896b176ff664dc9c2fce5426bf2fdf8017a7d
tree3f7e242becfb6954eb7d33c696788126b65d080c
parent1e4309ae4e7ddcf927ba61c63c126ae578c98362
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