[PATCH] new option for objcopy: --keep-global-symbol
hhonda@kobe-catv.ne.jp
hhonda@kobe-catv.ne.jp
Wed May 30 08:35:00 GMT 2001
Hi Nick,
> But people having been
> building libraries for ages, so how has this problem been solved
> before now ?
I want to know that, too.
Maybe I am so lazy that I cannot take care of prefixing
local-to-the-library symbols :->.
> Another problem that occurs to me if you strip all of the non-exported
> global symbols out the library by using this proposed patch, you will
> be forced to do this on a fully resolved binary.
???
--keep-global-symbol option leaves attributes of undefined symbols
unchanged. So undefined symbols are kept undefined, aren't they?
> I changed the code
> inside add_specified_symbols() so that it could cope with lines that
> are terminated by \r\n, so that it will work under Windows(tm).
Great.
> I
> also added the ability to use '#' as the start of a line comment,
> because it was simple to do, and it is always a good idea to be
> able to add comments to files.
My add_specified_symbols() adds every non-blank line (including
comment line) to xxx_specific_list, but it causes no trouble because
valid symbols do not begin with '#' on my target machine. I myself
use '#' comments in export.txt files and regard my
add_specified_symbols() as an example of K.I.S.S. approach, but this
again shows how lazy I am :->.
Anyway, thank you very much for accepting the patch.
HONDA Hiroki (hhonda@kobe-catv.ne.jp)
More information about the Binutils
mailing list