This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Limited export of dynamic syms (elf32)
- To: binutils at sources dot redhat dot com
- Subject: Re: [PATCH] Limited export of dynamic syms (elf32)
- From: Eirik Byrkjeflot Anonsen <eirik at opera dot com>
- Date: Thu, 16 Aug 2001 18:55:30 +0200
- References: <3B7BF14C.B2577814@opera.com> <u8ae10rmcx.fsf@gromit.moeb>
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