From dff604a75fe8cc500bdf8b6d037d2977f9230c2e Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 10 Mar 1995 18:13:31 +0000 Subject: * objcopy.c (strip_options): Add --keep-symbol. (copy_options): Likewise. (copy_usage): Mention --keep-symbol and -K. (strip_usage): Likewise. (keep_symbols): New static variable. (is_strip_symbol): Adjust the return value according to keep_symbols. (strip_main): Handle -K. For -N, check that -K was not given. (copy_main): Likewise. * binutils.texi, objcopy.1, strip.1: Document -K. --- binutils/objcopy.1 | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'binutils/objcopy.1') diff --git a/binutils/objcopy.1 b/binutils/objcopy.1 index a8c47f9..15cebb0 100644 --- a/binutils/objcopy.1 +++ b/binutils/objcopy.1 @@ -15,15 +15,16 @@ objcopy \- copy and translate object files .na .TP .B objcopy -.RB "[\|" \-F\ \fIbfdname\fB\ |\ \-\-target=\fIbfdname\fR "\|]" -.RB "[\|" \-I\ \fIbfdname\fB\ |\ \-\-input\-target=\fIbfdname\fR "\|]" -.RB "[\|" \-O\ \fIbfdname\fB\ |\ \-\-output\-target=\fIbfdname\fR "\|]" -.RB "[\|" \-R\ \fIsectionname\fB\ |\ \-\-remove\-section=\fIsectionname\fR "\|]" -.RB "[\|" \-S\ |\ \-\-strip\-all\fR "\|]" -.RB "[\|" \-g\ |\ \-\-strip\-debug\fR "\|]" -.RB "[\|" \-N\ \fIsymbolname\fR\ |\ \-\-strip\-symbol=\fIsymbolname\fR "\|]" -.RB "[\|" \-x\ |\ \-\-discard\-all\fR "\|]" -.RB "[\|" \-X\ |\ \-\-discard\-locals\fR "\|]" +.RB "[\|" \-F\ \fIbfdname\fR\ |\ \fB\-\-target=\fIbfdname\fR "\|]" +.RB "[\|" \-I\ \fIbfdname\fR\ |\ \fB\-\-input\-target=\fIbfdname\fR "\|]" +.RB "[\|" \-O\ \fIbfdname\fR\ |\ \fB\-\-output\-target=\fIbfdname\fR "\|]" +.RB "[\|" \-R\ \fIsectionname\fR\ |\ \fB\-\-remove\-section=\fIsectionname\fR "\|]" +.RB "[\|" \-S\fR\ |\ \fB\-\-strip\-all\fR "\|]" +.RB "[\|" \-g\fR\ |\ \fB\-\-strip\-debug\fR "\|]" +.RB "[\|" \-K\ \fIsymbolname\fR\ |\ \fB\-\-keep\-symbol=\fIsymbolname\fR "\|]" +.RB "[\|" \-N\ \fIsymbolname\fR\ |\ \fB\-\-strip\-symbol=\fIsymbolname\fR "\|]" +.RB "[\|" \-x\fR\ |\ \fB\-\-discard\-all\fR "\|]" +.RB "[\|" \-X\fR\ |\ \fB\-\-discard\-locals\fR "\|]" .RB "[\|" \-b\ \fIbyte\fR\ |\ \fB\-\-byte=\fIbyte\fR "\|]" .RB "[\|" \-i\ \fIinterleave\fR\ |\ \fB\-\-interleave=\fIinterleave\fR "\|]" .RB "[\|" \-\-gap\-fill=\fIval\fR "\|]" @@ -123,10 +124,14 @@ Do not copy relocation and symbol information from the source file. .B \-g\fR, \fB\-\-strip\-debug Do not copy debugging symbols from the source file. .TP +.B \-K \fIsymbolname\fR, \fB\-\-keep\-symbol=\fIsymbolname +Copy only symbol \fIsymbolname\fP from the source file. This option +may be given more than once. +.TP .B \-N \fIsymbolname\fR, \fB\-\-strip\-symbol=\fIsymbolname Do not copy symbol \fIsymbolname\fP from the source file. This option -may be given more than once, and may be combined with other strip -options. +may be given more than once, and may be combined with strip options +other than \fB\-K\fR. .TP .B \-x\fR, \fB \-\-discard\-all Do not copy non-global symbols from the source file. -- cgit v1.1