symbol hiding

Mike Hearn mh at codeweavers.com
Fri May 14 04:39:10 CDT 2004


On Fri, 14 May 2004 13:29:48 +0900, Dmitry Timoshkov wrote:
> Also, I personally feel a bit not comfortable when someone (for any
> reason) is looking into a binary and sees names of internal interfaces
> not appropriate for external learn/use. I find it ugly that I can't fully
> control such basic things in the ELF world.

IMHO it's cleaner to do what the glibc team do and simply mark them as
private using symbol versioning. Yes, they still appear in the symtab, but
when you read it at least you see:

__libc_foobar@@GLIBC_PRIVATE

and there can be no doubt whatsoever that it's internal. That also lets
you mark things as internal and still use them from other DSOs.

ELF linker behaviour when there are multiple symbols with the same name is
defined by the way, it's just a dumb behaviour :) Basically they all
get linked to the first symbol that was loaded unless you have things like
-Bsymbolic set (though that only works if the symbol being linked is in
the same object).

The correct solution to making ELF not suck is to implement support for
the DT_1_GROUP flag so we can get grouped fixed, like on Solaris. This is
closer to the Windows model that people intuitively expect. It should also
help with some of the pathological slowness that prompted initiatives like
prelink.

thanks -mike




More information about the wine-devel mailing list