mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
ecoff: check result of stat
* ecoff.c (_bfd_ecoff_write_armap): Don't use statbuf.st_mtime if stat call returns non-zero. Use ARMAP_TIME_OFFSET rather than its expansion.
This commit is contained in:
@@ -3132,9 +3132,9 @@ _bfd_ecoff_write_armap (bfd *abfd,
|
|||||||
complain that the index is out of date. Actually, the Ultrix
|
complain that the index is out of date. Actually, the Ultrix
|
||||||
linker just checks the archive name; the GNU linker may check the
|
linker just checks the archive name; the GNU linker may check the
|
||||||
date. */
|
date. */
|
||||||
stat (bfd_get_filename (abfd), &statbuf);
|
if (stat (bfd_get_filename (abfd), &statbuf) == 0)
|
||||||
_bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld",
|
_bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld",
|
||||||
(long) (statbuf.st_mtime + 60));
|
(long) (statbuf.st_mtime + ARMAP_TIME_OFFSET));
|
||||||
|
|
||||||
/* The DECstation uses zeroes for the uid, gid and mode of the
|
/* The DECstation uses zeroes for the uid, gid and mode of the
|
||||||
armap. */
|
armap. */
|
||||||
|
|||||||
Reference in New Issue
Block a user