This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Proposed patch to objectcopy.c
- From: Nick Clifton <nickc at redhat dot com>
- To: Daniel Marques <marques at cs dot cornell dot edu>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 15 Mar 2005 17:57:04 +0000
- Subject: Re: Proposed patch to objectcopy.c
- References: <421D209E.4060502@cs.cornell.edu>
Hi Daniel,
I would like to propose the attached patch to objectcopy.c.
This patch adds the command-line flag '--globalize-symbol <name>', which
will "force symbol <name> to be marked as global". In effect, it does
the inverse of the '--localize-symbol <name>' flag.
I like it. The patch is relatively clean and simple and I can see how
it might be useful. I have therefore decided to apply it to the
mainline sources along with these three changes:
1. I have added a "--globalize-symbols=<file>" switch along the
lines of the "--localize-symbols=<file>" switch, so that multiple
symbols can be easily converted by placing their names into a file.
2. I have added documentation to the binutils.texi file and
mentioned in the new feature in the NEWS file.
3. I have created this ChangeLog entry to go along with the changes:
binutils/ChangeLog
2005-03-15 Daniel Marques <marques@cs.cornell.edu>
Nick Clifton <nickc@redhat.com>
* objcopy.c (globalize_specific_list): New linked list of symbols
to convert from local binding into global binding.
(command_line_switch): Add OPTION_GLOBALIZE_SYMBOL and
OPTION_GLOBALIZE_SYMBOLS.
(copy_options): Add "globalize-symbol" and "globalize-symbols".
(copy_usage): Document the new switches.
(filter_symbols): Convert defined local symbols mentioned on the
globalize_specific_list into global symbols.
(copy_object): Perform actions if the globalize_specific_list is
not empty.
(copy_main): Handle new switches.
* NEWS: Mention new feature.
* doc/binutils.texi: Document new switches.
Cheers
Nick