aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-09-13 21:34:08 +0000
committerIan Lance Taylor <ian@airs.com>1996-09-13 21:34:08 +0000
commitdecf286508f94fc223e6b9b2b4020b5d1d8c1bbd (patch)
tree86c141514bf1fa5df32949cc4e4491e2ebf323b3 /binutils
parent1b3b1c2d3cada7949e183d024f32ace0652d3ac0 (diff)
downloadgdb-decf286508f94fc223e6b9b2b4020b5d1d8c1bbd.zip
gdb-decf286508f94fc223e6b9b2b4020b5d1d8c1bbd.tar.gz
gdb-decf286508f94fc223e6b9b2b4020b5d1d8c1bbd.tar.bz2
* objcopy.c (change_leading_char): New static variable.
(OPTION_CHANGE_LEADING_CHAR): Define. (copy_options): Add "change-leading-char". (copy_usage): Mention --change-leading-char. (filter_symbols): Add obfd parameter. Change all callers. Implement change_leading_char. (copy_object): Call filter_symbols if change_leading_char. (copy_main): Handle OPTION_CHANGE_LEADING_CHAR. * binutils.texi, objcopy.1: Document --change-leading-char.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog27
-rw-r--r--binutils/binutils.texi17
-rw-r--r--binutils/objcopy.120
3 files changed, 59 insertions, 5 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 9931ad0..ac482f4 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,30 @@
+Fri Sep 13 17:32:21 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * objcopy.c (change_leading_char): New static variable.
+ (OPTION_CHANGE_LEADING_CHAR): Define.
+ (copy_options): Add "change-leading-char".
+ (copy_usage): Mention --change-leading-char.
+ (filter_symbols): Add obfd parameter. Change all callers.
+ Implement change_leading_char.
+ (copy_object): Call filter_symbols if change_leading_char.
+ (copy_main): Handle OPTION_CHANGE_LEADING_CHAR.
+ * binutils.texi, objcopy.1: Document --change-leading-char.
+
+Tue Sep 3 14:05:29 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * ieee.c (ieee_enum_type): Don't check index into a NULL names
+ array.
+ * nm.c (sort_symbols_by_size): Always initialize next.
+ * rdcoff.c (parse_coff_type): Warn about an incomprehensible
+ type rather than crashing.
+ * rddbg.c (read_symbol_stabs_debugging_info): Initialize f.
+ * stabs.c (parse_stab_members): Set context in all cases.
+
+Thu Aug 29 16:56:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
+ * configure: Regenerate.
+
Thu Aug 29 11:29:20 1996 Ian Lance Taylor <ian@cygnus.com>
* objdump.c (L_tmpnam): Never define.
diff --git a/binutils/binutils.texi b/binutils/binutils.texi
index 053df4a..ff072af 100644
--- a/binutils/binutils.texi
+++ b/binutils/binutils.texi
@@ -816,7 +816,7 @@ objcopy [ -F @var{bfdname} | --target=@var{bfdname} ]
[ --adjust-warnings ] [ --no-adjust-warnings ]
[ --set-section-flags=@var{section}=@var{flags} ]
[ --add-section=@var{sectionname}=@var{filename} ]
- [ --remove-leading-char ]
+ [ --change-leading-char ] [ --remove-leading-char ]
[ -v | --verbose ] [ -V | --version ] [ --help ]
@var{infile} [@var{outfile}]
@end smallexample
@@ -986,13 +986,26 @@ contents of the new section are taken from the file @var{filename}. The
size of the section will be the size of the file. This option only
works on file formats which can support sections with arbitrary names.
+@item --change-leading-char
+Some object file formats use special characters at the start of
+symbols. The most common such character is underscore, which compilers
+often add before every symbol. This option tells @code{objcopy} to
+change the leading character of every symbol when it converts between
+object file formats. If the object file formats use the same leading
+character, this option has no effect. Otherwise, it will add a
+character, or remove a character, or change a character, as
+appropriate.
+
@item --remove-leading-char
If the first character of a global symbol is a special symbol leading
character used by the object file format, remove the character. The
most common symbol leading character is underscore. This option will
remove a leading underscore from all global symbols. This can be useful
if you want to link together objects of different file formats with
-different conventions for symbol names.
+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
+file.
@item -V
@itemx --version
diff --git a/binutils/objcopy.1 b/binutils/objcopy.1
index 3276b17..e83aa74 100644
--- a/binutils/objcopy.1
+++ b/binutils/objcopy.1
@@ -39,6 +39,7 @@ objcopy \- copy and translate object files
.RB "[\|" \-\-no\-adjust\-warnings\fR "\|]"
.RB "[\|" \-\-set\-section\-flags=\fIsection=flags\fR "\|]"
.RB "[\|" \-\-add\-section=\fIsectionname=filename\fR "\|]"
+.RB "[\|" \-\-change\-leading\-char\fR "\|]"
.RB "[\|" \-\-remove\-leading\-char\fR "\|]"
.RB "[\|" \-v\ |\ \-\-verbose\fR "\|]"
.RB "[\|" \-V\ |\ \-\-version\fR "\|]"
@@ -219,13 +220,26 @@ The size of the section will be the size of the file. This option
only works on file formats which can support sections with arbitrary
names.
.TP
+.B \-\-change\-leading\-char
+Some object file formats use special characters at the start of
+symbols. The most common such character is underscore, which compilers
+often add before every symbol. This option tells
+.B objcopy
+to change the leading character of every symbol when it converts
+between object file formats. If the object file formats use the same
+leading character, this option has no effect. Otherwise, it will add
+a character, or remove a character, or change a character, as
+appropriate.
+.TP
.B \-\-remove\-leading\-char
If the first character of a global symbol is a special symbol leading
character used by the object file format, remove the character. The
most common symbol leading character is underscore. This option will
-remove a leading underscore from all global symbols. This can be useful
-if you want to link together objects of different file formats with
-different conventions for symbol names.
+remove a leading underscore from all global symbols. This can be
+useful if you want to link together objects of different file formats
+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 \-v\fR, \fB\-\-verbose
Verbose output: list all object files modified. In the case of