On 9 April 2013 15:37, Pawel Dziepak <pdziepak@xxxxxxxxxxx> wrote: > I wonder why are we making program images position independent, since > PIC code is almost always slower than non-PIC code. Obviously, on x86 > it has to be that way because of ABI compatibility, this is not the > case on x86_64, though. The only obvious (for me) advantage of program > being PIC is the ability to randomize its location but I doubt that it > is worth the performance loss. Is it because machine independent parts > of Haiku code assume too much thus making such change for one > architecture too difficult? > I asked this while I was working on the port, some things rely on being able to load other application images as DSOs - see //www.freelists.org/post/haiku-gsoc/Kernel-moduleapplication-linking,1 It's not too much of problem, the overhead of PIC on x86_64 is nowhere near as bad as x86, due to IP-relative addressing. Thanks, Alex