From 2483354d4b143824ede17ac5726754ff88924719 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 27 Mar 1997 22:02:46 +0000 Subject: [PATCH] Based on patch from Marty Leisner : * objcopy.c: Include or . (strip_options): Add "preserve-dates". (copy_options): Likewise. (copy_usage): Mention -p and --preserve-dates. (strip_usage): Likewise. (make_same_dates): New static function. (strip_main): Handle -p. (copy_main): Likewise. * binutils.texi, strip.1, objcopy.1: Document new option. --- binutils/binutils.texi | 13 +++++++++++-- binutils/objcopy.1 | 5 +++++ binutils/strip.1 | 9 ++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/binutils/binutils.texi b/binutils/binutils.texi index d0ec85d255a..c2891195b53 100644 --- a/binutils/binutils.texi +++ b/binutils/binutils.texi @@ -813,7 +813,7 @@ objcopy [ -F @var{bfdname} | --target=@var{bfdname} ] [ -b @var{byte} | --byte=@var{byte} ] [ -i @var{interleave} | --interleave=@var{interleave} ] [ -R @var{sectionname} | --remove-section=@var{sectionname} ] - [ --debugging ] + [ -p | --preserve-dates ] [ --debugging ] [ --gap-fill=@var{val} ] [ --pad-to=@var{address} ] [ --set-start=@var{val} ] [ --adjust-start=@var{incr} ] [ --adjust-vma=@var{incr} ] @@ -932,6 +932,11 @@ copy with the @var{-b} or @samp{--byte} option. The default is 4. @code{objcopy} ignores this option if you do not specify either @samp{-b} or @samp{--byte}. +@item -p +@itemx --preserve-dates +Set the access and modification dates of the output file to be the same +as those of the input file. + @item --debugging Convert debugging information, if possible. This is not the default because only certain debugging formats are supported, and the @@ -1505,7 +1510,7 @@ strip [ -F @var{bfdname} | --target=@var{bfdname} | --target=@var{bfdname} ] [ -N @var{symbolname} | --strip-symbol=@var{symbolname} ] [ -x | --discard-all ] [ -X | --discard-locals ] [ -R @var{sectionname} | --remove-section=@var{sectionname} ] - [ -o @var{file} ] + [ -o @var{file} ] [ -p | --preserve-dates ] [ -v | --verbose ] [ -V | --version ] [ --help ] @var{objfile}@dots{} @end smallexample @@ -1572,6 +1577,10 @@ Put the stripped output in @var{file}, rather than replacing the existing file. When this argument is used, only one @var{objfile} argument may be specified. +@item -p +@itemx --preserve-dates +Preserve the access and modification dates of the file. + @item -x @itemx --discard-all Remove non-global symbols. diff --git a/binutils/objcopy.1 b/binutils/objcopy.1 index 659121db324..d3b8bb37256 100644 --- a/binutils/objcopy.1 +++ b/binutils/objcopy.1 @@ -28,6 +28,7 @@ objcopy \- copy and translate object files .RB "[\|" \-X\fR\ |\ \fB\-\-discard\-locals\fR "\|]" .RB "[\|" \-b\ \fIbyte\fR\ |\ \fB\-\-byte=\fIbyte\fR "\|]" .RB "[\|" \-i\ \fIinterleave\fR\ |\ \fB\-\-interleave=\fIinterleave\fR "\|]" +.RB "[\|" \-p\fR\ |\ \fB\-\-preserve\-dates\fR "\|]" .RB "[\|" \-\-debugging "\|]" .RB "[\|" \-\-gap\-fill=\fIval\fR "\|]" .RB "[\|" \-\-pad\-to=\fIaddress\fR "\|]" @@ -159,6 +160,10 @@ Only copy one out of every \fIinterleave\fP bytes. Which one to copy is selected by the \fB\-b\fP or \fB\-\-byte\fP option. The default is 4. The interleave is ignored if neither \fB\-b\fP nor \fB\-\-byte\fP is given. .TP +.B \-p\fR, \fB\-\-preserve\-dates +Set the access and modification dates of the output file to be the same +as those of the input file. +.TP .B \-\-debugging Convert debugging information, if possible. This is not the default because only certain debugging formats are supported, and the diff --git a/binutils/strip.1 b/binutils/strip.1 index 5b47414cd29..7974612194a 100644 --- a/binutils/strip.1 +++ b/binutils/strip.1 @@ -1,4 +1,4 @@ -.\" Copyright (c) 1991 Free Software Foundation +.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation .\" See section COPYING for conditions for redistribution .TH strip 1 "5 November 1991" "cygnus support" "GNU Development Tools" .de BP @@ -27,6 +27,7 @@ strip \- Discard symbols from object files. .RB "[\|" \-K\ \fIsymbolname\fR\ |\ \fB\-\-keep\-symbol=\fIsymbolname\fR "\|]" .RB "[\|" \-N\ \fIsymbolname\fR\ |\ \fB\-\-strip\-symbol=\fIsymbolname\fR "\|]" .RB "[\|" \-o\ \fIfile\f\R "\|]" +.RB "[\|" \-p\fR\ |\ \fB\-\-preserve\-dates "\|]" .RB "[\|" \-v\fR\ |\ \fB\-\-verbose "\|]" .RB "[\|" \-V\fR\ |\ \fB\-\-version "\|]" .RB "[\|" \-V\fR\ |\ \fB\-\-help "\|]" @@ -113,6 +114,12 @@ Put the stripped output in \fIfile\fR, rather than replacing the existing file. When this argument is used, only one \fIobjfile\fR argument may be specified. +.TP +.B \-p +.TP +.B \-\-preserve-dates +Preserve the access and modification dates of the file. + .TP .B \-x .TP -- 2.30.2