Based on patch from Marty Leisner <leisner@sdsp.mc.xerox.com>:

* objcopy.c: Include <utime.h> or <sys/time.h>.
	(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.
This commit is contained in:
Ian Lance Taylor 1997-03-27 22:02:46 +00:00
parent 8d9b566dc5
commit 2483354d4b
3 changed files with 24 additions and 3 deletions

View File

@ -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.

View File

@ -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

View File

@ -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