[FFmpeg-devel] Memory leak using bitstream filters with shared libs

Uoti Urpala uoti.urpala
Sun Mar 9 04:57:29 CET 2008


On Sun, 2008-03-09 at 03:42 +0000, M?ns Rullg?rd wrote:
> I can't see a reason why both bits of code can't use similar
> indirection to pick up the real address of the function.

They can - if you compile both with -fPIC.

> whereas the relevant instruction from ffmpeg.c is
> 
>   movq   $0x4038a0,0x48(%rsp)
> 
> The address 0x4038a0 is a PLT entry with a jump instruction:
> 
>   jmpq   *0x20e9a2(%rip)
> 
> Why can't the movq instruction reference the GOT instead of using the
> PLT entry?  I realise this would prohibit lazy binding of this symbol,
> but surely there's a way to handle that.

Note that the mov is writing a direct value, not reading from any memory
address. I assume you compiled it without -fPIC. If you compile with
-fPIC then it will use indirection through GOT.





More information about the ffmpeg-devel mailing list