Skip to content
Commit 6b02746a authored by Gleb Fotengauer-Malinovskiy's avatar Gleb Fotengauer-Malinovskiy Committed by Alan Modra
Browse files

PR28391, strip/objcopy --preserve-dates *.a: cannot set time

After commit 985e0264 copy_archive function began to pass invalid
values to the utimensat(2) function when it tries to preserve
timestamps in ar archives.  This happens because the bfd_stat_arch_elt
implementation for ar archives fills only the st_mtim.tv_sec part of
the st_mtim timespec structure, but leaves the st_mtim.tv_nsec part
and the whole st_atim timespec untouched leaving them uninitialized

	PR 28391
	* ar.c (extract_file): Clear buf for preserve_dates.
	* objcopy.c (copy_archive): Likewise.

(cherry picked from commit 0d620648)
parent d79efcd3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment