[Ffmpeg-devel] Re: [PATCH] Fix compilation when using --disable-opts
Sun Apr 1 13:03:46 CEST 2007
On Sun, Apr 01, 2007 at 11:28:40AM +0200, Reimar D?ffinger wrote:
> On Sun, Apr 01, 2007 at 11:21:05AM +0200, Michael Niedermayer wrote:
> > On Sun, Apr 01, 2007 at 10:09:16AM +0200, Reimar D?ffinger wrote:
> > > On Sun, Apr 01, 2007 at 02:23:48AM +0200, Alexis Ballier wrote:
> > > > >It might compile but that's because it ends up disabling the asm.
> > > >
> > > > which asm was disabled when building pic before
> > > > http://svn.mplayerhq.hu/ffmpeg?view=rev&revision=8549
> > > >
> > > > that changed from :
> > > > #if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__))
> > > > to :
> > > > #if defined(ARCH_X86) && defined(CONFIG_7REGS) &&
> > > > defined(CONFIG_EBX_AVAILABLE)
> > >
> > > It seems that for some of the code the right condition is
> > > #if defined(ARCH_X86) && defined(PIC)
> > > since due to the addressing modes used not allowing an extra offset due
> > > to PIC, no matter how many registers are available.
> > which code are you talking about?
> > and dont forget that data can be copied onto the stack that is nothing in
> > the gcc asm docs forbids it
> at least cabac.h, line 388
> "movzbl "MANGLE(ff_h264_lps_range)"(%0, %%ebx, 2), %%esi\n\t"
> and line 395
> "movzbl "MANGLE(ff_h264_lps_range)"("ret", "range", 2), "range" \n\t"\
> No way to make ff_h264_lps_range RIP-relative as needed to allow
> for PIC at least on AMD64 it seems. At least that is my understanding of
> the issue so far.
i always thought the broken shared lib loading used on linux these days
can do relocations ...
anyway there are 3 obvious ways this code can be generated (indpendant of
asm vs. c)
1. use relocations (fast execution, slow loading,
wastes some possibly alot of memory)
2. use extra instructions (slow execution and this is speedcritical code,
wastes memory but less)
3. use a global unique address for each shared lib (fast and wastes no mem,
also avoids all the other PIC overhead ...)
of course 3. is not supported on linux
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the ffmpeg-devel