[FFmpeg-devel] [FFmpeg-cvslog] r11100 - in trunk/libavcodec/i386: cavsdsp_mmx.c dsputil_mmx.c dsputil_mmx.h h264dsp_mmx.c mpegvideo_mmx.c vc1dsp_mmx.c

Rich Felker dalias
Mon Dec 3 03:34:31 CET 2007


On Mon, Dec 03, 2007 at 03:15:17AM +0200, Uoti Urpala wrote:
> On Sun, 2007-12-02 at 14:26 -0500, Rich Felker wrote:
> > > f2:
> > >         pushl   %ebx
> > >         call    __i686.get_pc_thunk.bx
> > >         addl    $_GLOBAL_OFFSET_TABLE_, %ebx
> > >         subl    $8, %esp
> > >         call    e2 at PLT
> > >         addl    $8, %esp
> > >         popl    %ebx
> > >         ret
> > > 
> > > -fvisibility makes no difference as it cannot affect the external
> > > declaration for e2, and the linker cannot change the already generated
> > > code for f2.
> > 
> > Well this is gcc being idiotic. There is absolutely no reason for a
> > PIC function call to look any different from a non-PIC one to the
> > caller. The fixup belongs entirely in the PLT. The call and jmp
> 
> More precisely the issue is that any access to symbols that might be in
> a different library triggers the addition of the function prologue that
> sets %ebx, independently of whether those symbols are functions or data
> variables.

Would you agree that this constitutes a gcc bug (or at least a serious
deficiency in generated code quality) and not something that library
developers should be worried about aside from reporting the bug to the
gcc team?

Rich




More information about the ffmpeg-devel mailing list