PATCH: objcopy.c: redefine-sym-specific for archive files
Nick Clifton
nickc@redhat.com
Tue Apr 26 17:12:00 GMT 2005
Hi Daniel,
> If an archive file (e.g. libc.a) consists of more than one object file
> (e.g, a.o & b.o) each containing a definition for a symbol named 'foo',
> objcopy --redefine-sym foo=bar libc.a will redefine both symbols.
> This might not always be the desired behavior. The attached patch adds
> the --redefine-sym-specific option to object copy. Its usage is
Why add a new switch ? Why not simply extend the syntax accepted by the
--redefine-sym switch so that if a colon is present it behaves as per
your new switch ?
> --redefine-sym-specific <objectfile>:<old>=<new>
Also - with a patch like this that adds a new feature, we really need an
FSF copyright assignment in place before we can accept the patch. Would
you be interested in completing such an assignment ?
> I did not include a version for reading these from a file, as that
> would require either 'generalizing' add_redefine_syms_file() or
> 'cloning' that function, and I though such a decision should be left
> to the maintainers.
Actually I would definitely encourage breaking out the code from
add_redefine_syms_file, generalizing it and making it available to other
switches which might benefit.
Cheers
Nick
More information about the Binutils
mailing list