This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Hiding symbols in a static library


Erik de Castro Lopo <mle+tools@mega-nerd.com> writes:

> I have a user of my library that is complaining about private symbols in
> my library clashing with the priviate symbols of another library. I
> suggested that they should use the dynamically linked version of my
> library which has all private symbols hidden by means of a version
> script.
>
> This has not satisfied this user who insists on needing to statically
> link. That leads me here, to ask if there is a way to hide private 
> symbols in a static library.

If you are talking about an archive, and if one object in an archive
has to refer to private symbols in another object in the archive, then
the answer is no.

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.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]