On Mon, 31 May 2010 14:31:19 +0200, Jonas Maebe <jonas.ma...@elis.ugent.be> wrote: > On 31 May 2010, at 14:23, Matthias Klumpp wrote: > >> A quick check which eu-findtextrels found a lot of those in the lib. >> Exactly the same code compiled for 64bit does not contain any text >> relocation. >> How can this happen? > > It's because we don't generate PIC (position-independent code) by > default on Linux-i386, because > a) PIC is fairly inefficient on i386 (it requires an extra register, > and the i386 is already register-starved as it is -- on average, it > results in a 10% performance degradation) > b) very few people use SELinux, and on non-SELinux systems dynamic > libraries without PIC work fine (with a small memory usage penalty, > because the code cannot be shared amongst multiple processes) According to SELinux, this is a security issue.. > On x86-64, there is almost no penalty for PIC vs no PIC. > You have to recompile the entire RTL and your own code with the -Cg > compiler option to get shared libraries that only contain PIC. Then it's up to red Hat to fix this in FPC or in SELinux.
Thanks! _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal