On Thu, Oct 09, 2003 at 02:05:47PM +0200, Jakub Jelinek wrote: >Looking at various /usr/X11R6/lib/lib*.so* shared libraries, >I'm seeing lots of exported symbols which look like they are exported >just because they cannot be static (as they are used by some other .o files >in the same shared library, but never by anything outside).
That is correct. >If these could be classified (e.g. some _X* symbols in libX11.so.6, >some _Ice* symbols in libICE.so.6 etc. might fall into this category), >XFree86 could have smaller and faster shared libraries with less dynamic >relocations, which would not need to set up PIC pointer so often and use >less instructions to access shared library local variables (by bypassing >GOT on some arches). ... and it would discourage applications from using symbols that aren't part of the published interfaces. I'd suggest starting with the library interface specs, exporting only those symbols that are documented as part of the interfaces, and seeing what applications break. If a signficant number of applications do break, that might suggest adjusting the specs to agree with common usage. I had plans of doing this with a linker version script, but it's still fairly low down on my todo list. >From an API point of view, I think it would be better to specify the symbols that should be public, rather than identifying all non-statics that shouldn't be. It'd also be good if this could be implemented for as many of the platforms we support as possible. David -- David Dawes Founder/committer/developer The XFree86 Project www.XFree86.org/~dawes _______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
