[MPlayer-dev-eng] [PATCH] OS/X build problems

Michael Niedermayer michaelni at gmx.at
Tue Oct 12 23:12:21 CEST 2004


Hi

On Tuesday 12 October 2004 18:40, Steven M. Schultz wrote:
> Hi -
>
>  Unconditionally adding "-fno-PIC" breaks building/linking on OS/X
>
>  On PPC systems all code is PIC by default (no penalty since it's
>  not a register starved arch like IA32) and while gcc/ld accept

this is wrong, PIC is always much slower, at least if u use gcc

accessing a global variable from non-PIC
1. (1 instruction) simply access it, its address is known at link time

accessing a global variable from PIC 
1. get GOT pointer somehow (code generated for this by gcc is very inefficient 
and slow)
2. get pointer for this specific global variable from the GOT table (i dunno 
if this is a gcc stupidity or a limitation of the ELF format which requires 
individual globals to be "moveable" relative to each other)
3. access global variable

[...]
-- 
Michael

"I do not agree with what you have to say, but I'll defend to the death your
right to say it." -- Voltaire




More information about the MPlayer-dev-eng mailing list