You are not logged in.

#1 2005-07-15 13:44:39

aquila_deus
Member
From: Taipei
Registered: 2005-07-02
Posts: 348
Website

arch is not prelink-friendly!

prelink: /usr/bin/sndfile-play: Cannot prelink against non-PIC shared library /usr/lib/libasound.so.2
prelink: /usr/lib/gimp/2.0/plug-ins/hot: Cannot prelink against non-PIC shared library /usr/lib/libgimpui-2.0.so.0
prelink: /usr/lib/gimp/2.0/plug-ins/warp: Cannot prelink against non-PIC shared library /usr/lib/libgimpui-2.0.so.0
prelink: /usr/lib/gimp/2.0/plug-ins/checkerboard: Cannot prelink against non-PIC shared library /usr/lib/libgimpui-2.0.so.0
.....

Why are there so many non-PIC shared libraries? Are they required to be so??

Offline

#2 2005-07-15 15:21:35

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: arch is not prelink-friendly!

because a) PIC is a tad slower to load if NOT prelinked and b) who prelinks anymore? there was a big hub-bub about this a while back... and then people realised there's a performance gain of like 0.2% so it really doesn't matter

Offline

#3 2005-07-15 15:40:19

rose
Member
Registered: 2005-02-09
Posts: 64

Re: arch is not prelink-friendly!

phrakture wrote:

because a) PIC is a tad slower to load if NOT prelinked

Libraries SHOULD be compiled PIC, because otherwise you will waste a lot of memory because of relocations. Moreover, the relocations make non-PIC libraries SLOWER, not faster, to load than their PIC counterparts. On the other hand, you pay for PIC every time a function is called, but this is usually more accteptable than the linker/memory overhead.

You must know why Linux switched from a.out to elf, don't you?

I agree that you gain little with prelinking, because ld.so is much better than it used to.

Offline

#4 2005-07-15 18:11:27

ecoffey
Member
Registered: 2005-06-24
Posts: 14

Re: arch is not prelink-friendly!

I always thought you HAD to compile all your .c files with -fPIC when building a shared object, or is this about actually passing -fPIC to gcc during the final shared object link up?

Offline

#5 2005-07-15 18:51:23

rose
Member
Registered: 2005-02-09
Posts: 64

Re: arch is not prelink-friendly!

ecoffey wrote:

I always thought you HAD to compile all your .c files with -fPIC when building a shared object, or is this about actually passing -fPIC to gcc during the final shared object link up?

PIC has to be enabled during compilation, not linking. You DON'T have to use fPIC on shared libraries, but this will prevent sharing of text segments (i.e. each process will have separate code of glibc, gtk!).

Offline

#6 2005-07-15 19:02:59

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: arch is not prelink-friendly!

Prelink sucks.If you want a performance gain, use hdparm.

Offline

Board footer

Powered by FluxBB