On Mon, Dec 06, 1999 at 12:32:22PM +0530, Sharad Joshi wrote:
> + It's a constant overhead due to ELF headers. If you increase the size of
> + the text/data sections (as is typical for a Linux executable), the overhead 
> + becomes negligible.
> 
> I guessed that. But did not know that the "overhead" was so large. In some
> cases (even in the case of "big" .o's in the range of 20k) this "overhead"
> is almost 30-35%. Interesting stats. 'Think i'll have to dig into d-tails
> of binary formats for more info.

Oh, I take it back. There is a symbol table that is a part of the large
executables. The size of the symbol table increases with the number of
symbols.

A while ago, this was a major concern on

news://news.mozilla.org/netscape.public.mozilla.unix

Linux binaries were bloated compared to Windows ones - especially so
in the presence of a large number of shared libs. Someone wrote a 
compiler patch to reduce it to some extent. But you need a patched
compiler for that.

One common tip is to make all your global variables/funcs static, if they're
not used outside the file. 

        -Arun


--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.

Reply via email to