From 9a442fe8a57cea65858b1613b21a2f516a04217d Mon Sep 17 00:00:00 2001
From: Ian Lance Taylor <ian@airs.com>
Date: Thu, 19 Dec 1996 18:16:45 +0000
Subject: 	Based on patch from Andrew J Klossner
 <andrew@pogo.wv.tek.com>: 	* objcopy.c (OPTION_WEAKEN): Define. 
 (copy_options): Add "weaken". 	(copy_usage): Mention --weaken. 
 (weaken): New static variable. 	(filter_symbols): Handle weaken. 
 (copy_object): Call filter_symbols if weaken. 	(copy_main): Handle
 OPTION_WEAKEN. 	* binutils.texi, objcopy.1: Document --weaken. PR
 11272.

---
 binutils/ChangeLog     | 17 +++++++++++++++++
 binutils/NEWS          |  2 ++
 binutils/binutils.texi |  7 +++++++
 binutils/objcopy.1     |  4 ++++
 4 files changed, 30 insertions(+)

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 024ada5..9a64749 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,20 @@
+Thu Dec 19 13:11:20 1996  Ian Lance Taylor  <ian@cygnus.com>
+
+	Based on patch from Andrew J Klossner <andrew@pogo.wv.tek.com>:
+	* objcopy.c (OPTION_WEAKEN): Define.
+	(copy_options): Add "weaken".
+	(copy_usage): Mention --weaken.
+	(weaken): New static variable.
+	(filter_symbols): Handle weaken.
+	(copy_object): Call filter_symbols if weaken.
+	(copy_main): Handle OPTION_WEAKEN.
+	* binutils.texi, objcopy.1: Document --weaken.
+
+Sat Dec  7 10:17:25 1996  Jeffrey A Law  (law@cygnus.com)
+
+	* Makefile.in (install): Add "else true" clause to cater to
+	broken "make" on some systems.
+
 Fri Dec  6 17:21:41 1996  Ian Lance Taylor  <ian@cygnus.com>
 
 	* ieee.c (parse_ieee_bb): Always initialize namcopy to avoid gcc
diff --git a/binutils/NEWS b/binutils/NEWS
index 454ee0f..d441ceb 100644
--- a/binutils/NEWS
+++ b/binutils/NEWS
@@ -11,6 +11,8 @@ Changes since binutils 2.7
 
 * Added --change-leading-char argument to objcopy.
 
+* Added --weaken argument to objcopy.
+
 * objdump --dynamic-reloc now works on ELF executables and shared libraries.
 
 Changes since binutils 2.6
diff --git a/binutils/binutils.texi b/binutils/binutils.texi
index d59f545..08666cc 100644
--- a/binutils/binutils.texi
+++ b/binutils/binutils.texi
@@ -818,6 +818,7 @@ objcopy [ -F @var{bfdname} | --target=@var{bfdname} ]
         [ --set-section-flags=@var{section}=@var{flags} ]
         [ --add-section=@var{sectionname}=@var{filename} ]
         [ --change-leading-char ] [ --remove-leading-char ]
+        [ --weaken ]
         [ -v | --verbose ] [ -V | --version ]  [ --help ]
         @var{infile} [@var{outfile}]
 @end smallexample
@@ -1008,6 +1009,12 @@ different conventions for symbol names.  This is different from
 when appropriate, regardless of the object file format of the output
 file.
 
+@item --weaken
+Change all global symbols in the file to be weak.  This can be useful
+when building an object which will be linked against other objects using
+the @code{-R} option to the linker.  This option is only effective when
+using an object file format which supports weak symbols.
+
 @item -V
 @itemx --version
 Show the version number of @code{objcopy}.
diff --git a/binutils/objcopy.1 b/binutils/objcopy.1
index e83aa74..ad087e8 100644
--- a/binutils/objcopy.1
+++ b/binutils/objcopy.1
@@ -41,6 +41,7 @@ objcopy \- copy and translate object files
 .RB "[\|" \-\-add\-section=\fIsectionname=filename\fR "\|]"
 .RB "[\|" \-\-change\-leading\-char\fR "\|]"
 .RB "[\|" \-\-remove\-leading\-char\fR "\|]"
+.RB "[\|" \-\-weaken\fR "\|]"
 .RB "[\|" \-v\ |\ \-\-verbose\fR "\|]" 
 .RB "[\|" \-V\ |\ \-\-version\fR "\|]" 
 .RB "[\|" \-\-help\fR "\|]" 
@@ -241,6 +242,9 @@ with different conventions for symbol names.  This is different from
 @code{--change-leading-char} because it always changes the symbol name
 when appropriate, regardless of the object file format of the output
 .TP
+.B\-\-weaken
+Change all global symbols in the file to be weak.
+.TP
 .B \-v\fR, \fB\-\-verbose
 Verbose output: list all object files modified.  In the case of
 archives, "\fBobjcopy \-V\fR" lists all members of the archive.
-- 
cgit v1.1