diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-06-16 04:53:09 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-06-16 04:53:09 +0000 |
commit | 33586ee770edaa036c27508b5ec5c8c263973941 (patch) | |
tree | 31e78169d31557f0ed74b64988e5a3438996717b /libavutil/internal.h | |
parent | d9aac2676161e4116574482508d9c7f0c4398f49 (diff) | |
download | ffmpeg-33586ee770edaa036c27508b5ec5c8c263973941.tar.gz |
Document FF_SYMVER and attribute_used
Originally committed as revision 23622 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/internal.h')
-rw-r--r-- | libavutil/internal.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h index b361f722fa..08a34a6031 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -46,6 +46,12 @@ #endif #endif + +/** + * Marks a variable as used and prevents the compiler from optimizing it away. + * This is usefull for asm that accesses varibles in ways that the compiler doesnt + * understand + */ #ifndef attribute_used #if AV_GCC_VERSION_AT_LEAST(3,1) # define attribute_used __attribute__((used)) @@ -196,6 +202,15 @@ # define NULL_IF_CONFIG_SMALL(x) x #endif + +/** + * Create a non default alias for a function with specified version. + * This is needed when symbols are moved from a lib to a dependancy of the lib + * because the gnu linker as of 2010 is buggy and fails to dynamicaly link if a symbol + * is not found in the lib in which it was during link time with enabled versioning + * even if a correctly versioned and matching symbol exists in another lib and + * even if it did find that would it not contain an explicit check to fail + */ #if HAVE_SYMVER_ASM_LABEL # define FF_SYMVER(type, name, args, ver) \ type ff_##name args __asm__ (EXTERN_PREFIX #name "@" ver); \ |