symbol hiding

James Courtier-Dutton James at superbug.demon.co.uk
Fri May 14 09:46:15 CDT 2004


Erik de Castro Lopo wrote:
> On Fri, 14 May 2004 14:24:51 +0100
> James Courtier-Dutton <James at superbug.demon.co.uk> wrote:
> 
> 
>>What is wrong with seeing names of internal interfaces?
> 
> 
> The main problem is the likelihood of symbol collisions between 
> internal symbols which are the same in two different libraries.
> 
> By restricting the exported symbols to just the public interfaces
> you reduce the chances of this.


I would really like the linux program loader to at least warn us when 
duplicate symbols are being used. But currently, all we get is some 
strangely performing application with a very hard to track down bug.

> 
> 
>>If someone wants to use a lib you publish, they just look in the .h file 
>>to find out how to interface with it. They won't be looking in the 
>>binary file to find out how to use it.
>>
>>I expect that one of the reasons why one can't control "such basic 
>>things in the ELF world"
> 
> 
> Controlling which symbols are exported from a lib is just as easy with
> ELF as it is in windows. I do it with both of my two libraries:

I know that, I write libs for the open source community.
I think what this person was saying is from the point of view of looking 
at the binary file itself.
But even after filtering the symbols, they will then not be published 
externally, but can still be listed if one views the binary directly.

> 
>     http://www.mega-nerd.com/libsndfile/
>     http://www.mega-nerd.com/SRC/
> 
> Exported symbols are limited on Linux, MacOSX and Win32.
> 
> Erik




More information about the wine-devel mailing list