Why is GNU/Linux so Bloated?
Nadav Har'El
nyh at math.technion.ac.il
Sun Jun 14 16:33:17 IDT 2009
On Thu, Jun 11, 2009, Shlomi Fish wrote about "Re: Why is GNU/Linux so Bloated?":
> I've compared the size of the Linux .so file (after -Os and strip) to the size
> of the Windows MSVC-generated .dll.
>
> With gcc -Os before strip - 86,464 bytes
> same after strip - 74,584
Shlomi, what did you expect "strip" to do for the shared object? It
definitely does not, and cannot, remove the *dynamic* symbol table which
is needed to link this library. Try "nm -D" on your library to see the
dynamic symbol table even after the strip. Is it possible that gcc saves a
lot of crap in this symbol table that Windows doesn't?
Finally, I have no idea what your makefile looks like, but make sure that
you do not accidentally statically-link the C library into your shared object.
You'll want to dynamically-link it (to add a dependency), but not statically
link it (which will add some actual code from the C library into your shared
library).
--
Nadav Har'El | Sunday, Jun 14 2009, 22 Sivan 5769
nyh at math.technion.ac.il |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |Sign in pool: "Welcome to our OOL. Notice
http://nadav.harel.org.il |there is no P, please keep it that way."
More information about the Linux-il
mailing list