Go to file
Siddhesh Poyarekar 8e03235147 binutils: Avoid renaming over existing files
Renaming over existing files needs additional care to restore
permissions and ownership, which may not always succeed.
Additionally, other properties of the file such as extended attributes
may be lost, making the operation flaky.

For predictable results, resort to rename() only if the file does not
exist, otherwise copy the file contents into the existing file.  This
ensures that no additional tricks are needed to retain file
properties.

This also allows dropping of the redundant set_times on the tmpfile in
objcopy/strip since now we no longer rename over existing files.

binutils/

	* ar.c (write_archive): Adjust call to SMART_RENAME.
	* arsup.c (ar_save): Likewise.
	* objcopy (strip_main): Don't set times on temporary file and
	adjust call to SMART_RENAME.
	(copy_main): Likewise.
	* rename.c [!S_ISLNK]: Remove definitions.
	(try_preserve_permissions): Remove function.
	(smart_rename): Replace PRESERVE_DATES argument with
	TARGET_STAT.  Use rename system call only if TO does not exist.
	* bucomm.h (smart_rename): Adjust declaration.

(cherry picked from commit 3685de750e)
2021-02-22 20:45:50 +05:30
bfd Automatic date update in version.in 2021-02-22 00:00:39 +00:00
binutils binutils: Avoid renaming over existing files 2021-02-22 20:45:50 +05:30
config Add Changelog entries and NEWS entries for 2.36 branch 2021-01-09 10:40:28 +00:00
contrib
cpu Add Changelog entries and NEWS entries for 2.36 branch 2021-01-09 10:40:28 +00:00
elfcpp This is 2.36.1 release 2021-02-06 09:12:37 +00:00
etc Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
gas IBM Z: Implement instruction set extensions 2021-02-19 14:19:12 +01:00
gdb Pass void_context_p to parse_expression 2021-01-08 12:20:43 -07:00
gdbserver [gdb/build] Fix gdbserver build with -fsanitize=address 2021-01-07 10:37:51 +01:00
gdbsupport gdb: check for empty strings in get_standard_cache_dir/get_standard_config_dir 2021-01-08 13:46:56 -05:00
gnulib Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
gold This is 2.36.1 release 2021-02-06 09:12:37 +00:00
gprof This is 2.36.1 release 2021-02-06 09:12:37 +00:00
include IBM Z: Implement instruction set extensions 2021-02-19 14:19:12 +01:00
intl
ld ld: Remove x86 ISA level run-time tests 2021-02-07 14:36:38 -08:00
libctf 2.36 release 2021-01-24 10:49:36 +00:00
libdecnumber
libiberty Update libiberty with latest sources from gcc mainline 2021-01-05 12:36:09 +00:00
opcodes IBM Z: Implement instruction set extensions 2021-02-19 14:19:12 +01:00
readline
sim sim: common: add missing stdlib.h for abort() 2021-01-09 02:45:14 -05:00
texinfo
zlib configure regen 2021-01-09 15:12:44 +10:30
.cvsignore
.gitattributes
.gitignore
ar-lib
ChangeLog ld: depend on libctf 2021-01-27 11:05:32 +00:00
compile
config-ml.in
config.guess Update config.sub and config.guess 2021-01-05 15:55:59 +10:30
config.rpath
config.sub config.sub update broke powerpc-eabivle 2021-01-07 08:56:28 +10:30
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.LIBGLOSS
COPYING.NEWLIB
depcomp
djunpack.bat
install-sh
libtool.m4 libtool.m4: update GNU/Hurd test from upstream. In upstream libtool, 47a889a4ca20 ("Improve GNU/Hurd support.") fixed detection of shlibpath_overrides_runpath, thus avoiding unnecessary relink. This backports it. 2021-01-07 16:47:36 +00:00
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS
Makefile.def ld: depend on libctf 2021-01-27 11:05:32 +00:00
Makefile.in ld: depend on libctf 2021-01-27 11:05:32 +00:00
Makefile.tpl
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
README-maintainer-mode
setup.com
src-release.sh
symlink-tree
test-driver
ylwrap

		   README for GNU development tools

This directory contains various GNU compilers, assemblers, linkers, 
debuggers, etc., plus their support routines, definitions, and documentation.

If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README;  if with a libg++ release,
see libg++/README, etc.  That'll give you info about this
package -- supported targets, how to use it, how to report bugs, etc.

It is now possible to automatically configure and build a variety of
tools with one command.  To build all of the tools contained herein,
run the ``configure'' script here, e.g.:

	./configure 
	make

To install them (by default in /usr/local/bin, /usr/local/lib, etc),
then do:
	make install

(If the configure script can't determine your type of computer, give it
the name as an argument, for instance ``./configure sun4''.  You can
use the script ``config.sub'' to test whether a name is recognized; if
it is, config.sub translates it to a triplet specifying CPU, vendor,
and OS.)

If you have more than one compiler on your system, it is often best to
explicitly set CC in the environment before running configure, and to
also set CC when running make.  For example (assuming sh/bash/ksh):

	CC=gcc ./configure
	make

A similar example using csh:

	setenv CC gcc
	./configure
	make

Much of the code and documentation enclosed is copyright by
the Free Software Foundation, Inc.  See the file COPYING or
COPYING.LIB in the various directories, for a description of the
GNU General Public License terms under which you can copy the files.

REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
on where and how to report problems.