[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

Loren Merritt lorenm
Thu Nov 29 23:53:47 CET 2007


On Fri, 30 Nov 2007, Pavlov Konstantin wrote:
> On Tue, Nov 27, 2007 at 11:23:35PM +0100, aurel wrote:
>> Author: aurel
>> Date: Tue Nov 27 23:23:34 2007
>> New Revision: 11100
>>
>> Log:
>> make ff_p* vars extern so that they can be used in various *_mmx.c files
>>
>> Added:
>>    trunk/libavcodec/i386/dsputil_mmx.h
>> Modified:
>>    trunk/libavcodec/i386/cavsdsp_mmx.c
>>    trunk/libavcodec/i386/dsputil_mmx.c
>>    trunk/libavcodec/i386/h264dsp_mmx.c
>>    trunk/libavcodec/i386/mpegvideo_mmx.c
>>    trunk/libavcodec/i386/vc1dsp_mmx.c
>
> This seems to break shared library builds here on x86_64:
> /usr/bin/ld: i386/dsputil_mmx.o: relocation R_X86_64_PC32 against
> `ff_pw_20' can not be used when making a shared object; recompile with
> -fPIC
> /usr/bin/ld: final link failed: Bad value
>
> and of course i386/dsputil_mmx.o is built using -fPIC -DPIC:
>
> gcc -I"/home/thresh/RPM/BUILD/ffmpeg-11113-alt1"/libswscale
> -I"/home/thresh/RPM/BUILD/ffmpeg-11113-alt1"/libavcodec
> -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> -D_ISOC9X_SOURCE -I"/home/thresh/RPM/BUILD/ffmpeg-11113-alt1"
> -I"/home/thresh/RPM/BUILD/ffmpeg-11113-alt1"
> -I"/home/thresh/RPM/BUILD/ffmpeg-11113-alt1"/libavutil -pipe -Wall -O2
> -frename-registers -fPIC -DPIC -fomit-frame-pointer -pthread
> -I/usr/include/dirac -Wdeclaration-after-statement -Wall -Wno-switch
> -Wdisabled-optimization -Wpointer-arith -Wredundant-decls
> -Wno-pointer-sign -O3 -O3  -fPIC -DPIC -c -o i386/dsputil_mmx.o
> i386/dsputil_mmx.c
>
> Suggestions on how to fix it?

(1) static (like it was before)
(2) #pragma GCC visibility ...
(3) ld -Bsymbolic
(4) ld --version-script ...
(5) implement full PIC access (double deference, not just rip-relative).

(2) obvisouly requires gcc. (3) and (4) require GNU ld. (5) makes the 
shared library slower (I have no idea how much).

--Loren Merritt




More information about the ffmpeg-devel mailing list