[PATCH] Limited export of dynamic syms (elf32)
Eirik Byrkjeflot Anonsen
eirik@opera.com
Thu Aug 16 09:54:00 GMT 2001
Andreas Jaeger wrote:
>
> Eirik Byrkjeflot Anonsen <eirik@opera.com> writes:
>
> > I have implemented a possibility for exporting only selected symbols
> > as dynamic symbols in the elf32 case.
>
> Is this for shared libs or for applications? What is the advantage of
> this over symbol versioning?
>
> Andreas
I believe it works for both. The reason for implementing it was
to make Opera/Linux not export internal symbols that could expose
parts of the program that we don't want exposed (like the registration
code...). Another reason is the possibility of a shared library loaded
by Opera (like a plug-in) accidentally calling internal functions of
Opera. And finally, we saved roughly 1.5 Mb (IIRC) on the final
executable size.
Given a shared library with only a few functions that
are supposed to be called, all three of these concerns are quite valid.
With the addition that the library could accidentally override a symbol
in another library due to having the same name.
Incidentally, I forgot to mention this in the last mail, but I don't
subscribe to the list, so thanks for mailing me directly.
eirik
More information about the Binutils
mailing list