Hiding symbols in a static library
Ken Raeburn
raeburn@raeburn.org
Sun Sep 27 10:06:00 GMT 2009
On Sep 27, 2009, at 04:00, Erik de Castro Lopo wrote:
>> If it's OK to use ld -r instead of building an archive, then it may
>> work to use ld -r with --retain-symbols-file.
>
> Can ld output a static library? I've read the ld man page and I
> didn't
> find any mention of static libraries as an output.
It can output a single object file, which your user can either then
link directly into the application, or (if your user *really* needs an
archive library for some reason) pass to "ar" to generate a new
archive library with one member, or fold into some other archive
library being built as part of the application, etc.
Ken
More information about the Binutils
mailing list