[Ffmpeg-devel] How to reduce the ffmpeg avcodec.dll, avformat.dllsize

Måns Rullgård mru
Tue Mar 21 19:26:36 CET 2006


Michael Niedermayer <michaelni at gmx.at> writes:

> Hi
>
> On Mon, Mar 20, 2006 at 10:31:05PM +0000, M?ns Rullg?rd wrote:
>> Michael Niedermayer <michaelni at gmx.at> writes:
>> 
>> > Hi
>> >
>> > On Mon, Mar 20, 2006 at 09:44:43PM +0000, M?ns Rullg?rd wrote:
>> >> Michael Niedermayer <michaelni at gmx.at> writes:
>> >> 
>> >> > Hi
>> >> >
>> >> > On Mon, Mar 20, 2006 at 09:44:44AM -0500, Rich Felker wrote:
>> >> > [...]
>> >> >> If code is not being removed by the compiler with some
>> >> >> encoders/decoders disabled, it's probably because it's accidentally
>> >> >> being used, due to function pointers in the data segment, etc.
>> >> >
>> >> > no, IIRC gcc until very recently (4.0 or so) did NOT support removing
>> >> > unused static functions, and iam not even sure if latest gcc does it
>> >> > by default
>> >> 
>> >> Unused static functions have been removed in the compilation phase for
>> >> a long time.  You probably mean extern functions.  They can be
>> >> referenced in much more subtle ways.
>> >
>> > nope, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11278
>> 
>> The example there is a function that could be removed completely
>> because it does nothing.  Unreferenced static functions are AFAIK
>> always removed properly.
>
> look at the example in the bugreport, compile it with gcc-3.3 or
> older and look at the resulting binary, it will contain a
> function which is static and not referenced by anything

That could be, and that is a bug.  It is still true that static
functions not referenced in *source* get removed.

-- 
M?ns Rullg?rd
mru at inprovide.com





More information about the ffmpeg-devel mailing list