delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2014/04/21/04:51:09

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
Date: Mon, 21 Apr 2014 11:35:40 +0300
From: Eli Zaretskii <eliz AT gnu DOT org>
Subject: Re: ctime.c changes add about 4.5k more size
In-reply-to: <CAA2C=vBamXSU9Eh53WTLos=nemZs+uJ09QPF9Y8Jj4OSdZPsyQ@mail.gmail.com>
X-012-Sender: halo1 AT inter DOT net DOT il
To: djgpp-workers AT delorie DOT com
Message-id: <83vbu3cc6b.fsf@gnu.org>
References: <CAA2C=vBamXSU9Eh53WTLos=nemZs+uJ09QPF9Y8Jj4OSdZPsyQ AT mail DOT gmail DOT com>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Mon, 21 Apr 2014 09:44:12 +0300
> From: Ozkan Sezer <sezeroz AT gmail DOT com>
> 
> Recent(ish) src/libc/ansi/time/ctime.c changes add about 4.5k more
> size to the final stripped binary:
> 
> #include <time.h>
> int main () {
>  return time(NULL);
> }
> 
> Linking against v2.04 from 2011-10-01 gives a 91648 bytes a.exe,
> whereas linking against v2.04 from 2014-04-20 gives a 96256 bytes
> a.exe. (not mentioning at all the crazy sizes themselves which is
> irrelevant to the present case at hand.)  A "return 0" instead of
> a "return time(NULL)" yields a 52736 bytes exe, so ctime.c stuff
> is adding about 43k size.
> 
> time() calls gettimeofday() which calls 0x2c and 0x2a dos functions
> and calls ctime.c::mktime() where the additional bloat happens.
> 
> Is there no other way of reducing the code size here?

Can you identify the additions/changes that cause the bloat?  (Or
maybe you already did above, and I missed that?)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019