tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Trivial program size inflation



>>>> amd64, 9.0_STABLE (ftp.n.o):

>>>>    text    data     bss     dec     hex filename
>>>>  562318   29064 2176416 2767798  2a3bb6 main

> amd64, 9.0_STABLE:
>    data     bss     dec     hex filename
>    2873     186      72    3131     c3b a.out

Is that linked dynamic, or did you stub out all the miscellanous junk?
Is that what the code you quote (below, which I'm cutting) is?

> crt0 pulls in
> - atexit
> - environment
> - static TLS
> - stack guard

Why TLS??  Is there some networking going on under the hood?

Still, I would have expected all that to be done via weak symbols, so
if they aren't needed they aren't brought in.  For example, there's no
need for the atexit support if the program never uses it, so with
suitable use of weak symbols and the like it should be possible for
crt0 to call on it only if it's used.

Or, at least, so I would expect.  Am I missing something?

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index