On Fri, Apr 11, 2003 at 01:14:28PM +0200, Felipe Alfaro Solana wrote: > > mozilla-bin is not a program where prelink helps much, as it has in total > > just about 4k relocations (it dlopens most of the libs), it should be way > > more visible on something like KDE stuff. > > Most of KDE binaries can't get prelinked as they link against libGL.so > which is not a PIC shared library. Sure, I know. Some time ago when konqueror etc. still could be prelinked (don't remember if it was because it was not linked against libGL or because there were no conflicts against libGL's read-only sections during prelinking) the difference after prelinking was really big (those applications typically have something like 80000 relocations). > > Most of the errors are about libGL.so not being PIC, right? > > That's something that needs still fixing. > > Exactly! Can someone explain why libGL isn't PIC? Lack of time? The thing is, a couple of routines in libGL.so are performance critical. For those, the slowdown caused by PIC code is, according to people defending -fno-pic libGL.so, important. Most of the routines in that library though really aren't performance critical, and those which are performance critical can be still -fno-pic while not causing DT_TEXTREL (but it requires more work) and also can be optimized using other techniques (TLS, etc.). Jakub