[parisc-linux] xfree86 build problem

amodra@one.net.au amodra@one.net.au
Sun, 15 Apr 2001 15:47:43 +0930


On Sat, Apr 14, 2001 at 10:36:25PM -0600, Grant Grundler wrote:
> amodra@one.net.au wrote:
> > True, but it's not recommended.  The reason being that non-PIC code in
> > a shared lib will mean lib pages with relocations can't be shared between
> > processes should the library be loaded at a different virtual addresses.
> 
> Well, I guess either x86 doesn't have that problem,

It does.

> no one has noticed it, or no one cares (OpenGL fans?).

Possibly :-(  As Ulrich mentioned, it's fairly easy to see if a shared lib
can't actually be shared.  "readelf -d libwhatever.so | grep DT_TEXTREL"

> Under build-env/xc/lib/GL/glu Imakefiles
> all have the following construct: (eg libtess/Imakefile)
> 
> 	NormalLibraryTarget(tess, $(OBJS))
> 		rm -f unshared; ln -sf . ./unshared
> 
> The result is only .a's get built and the libGLU.so is globbed together
> from those. The last step fails for __hppa__ since the .o's are non-PIC.

I suppose you could build the .a lib with -fPIC as a workaround.

-- 
Alan Modra