2019-02-20 10:13 GMT+01:00, Fāng-ruì Sòng <maskray-at-google....@ffmpeg.org>: > Inline asm code assumes these DECLARE_ASM_ALIGNED declared global > constants are non-preemptive, e.g. > > libavcodec/x86/cabac.h > "lea "MANGLE(ff_h264_cabac_tables)", %0 \n\t" > > On ELF platforms, if -Wl,-Bsymbolic > -Wl,--version-script,libavcodec/libavcodec.ver are removed from the > linker command line, the symbol will be considered preemptive and fail
Why is it a good idea to remove them from the linker command line? > to link to a DSO: > > ld.lld: error: relocation R_X86_64_PC32 cannot be used against > symbol ff_h264_cabac_tables; recompile with -fPIC > > It is better to express the intention explicitly and mark such global > constants hidden (non-preemptive). It also improves portability as no > linker magic is required. > > DECLARE_ASM_CONST uses the "static" specifier to indicate internal > linkage. The visibility annotation is unnecessary. > > Also remove __clang__ as clang pretends to be gcc 4.2 and defines __GNUC__ The word "also" indicates here that this should be an independent patch. Carl Eugen _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel