[Libav-user] reduce dll size

YIRAN LI mrfun.china at gmail.com
Fri Mar 28 04:32:30 CET 2014


Hi friends,

Here are some update. I added a --extra-ldflags=-Wl,-Map=out.map as
configure option and then was able to generate the map file. And from it I
can see that .text and .rdata sections occupy most space of the dll. Since
map file also tells which object file introduces how much space into .text
and .rdata. I could easily figure out what codecs I should remove to save
space.

Another thing is, objects statically linked into avcodec from external
libraries are quite smaller. There do have some objects from libgcc,
libmingw32 that is built into avcodec, but the total size in .text and
.rdata is just about 30-50K which is negligible.




2014-03-26 21:01 GMT+11:00 Alex Cohn <alexcohn at netvision.net.il>:

> On 26 Mar 2014 11:54, "Carl Eugen Hoyos" <cehoyos at ag.or.at> wrote:
> >
> > Michael Chisholm <chisholm at ...> writes:
> >
> > > It seems to me, what you may gain by linking to a static
> > > lib, is that only that library code which is actually
> > > used by the app is pulled in to the exe
> >
> > This is true but it (mostly) does not apply to FFmpeg:
> > All the encoders, decoders, demuxers, muxers, parsers etc.
> > are linked into your static executable no matter if you
> > need them or not.
>
> ... and that's by virtue of register_all() and her kin, is that true?
>
> Alex Cohn
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20140328/ea24c95c/attachment.html>


More information about the Libav-user mailing list