delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2014/04/21/08:39:46

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=4e/nWKvf3RvHeD1XhBBpAFSbV4b8SGQRcoymi7zTCjE=;
b=oNANi8PKTM2CQNx5TEXdG/j43bYKNVokKlTs0C8rQiivAnDrTul/H/Ajt2vDKV7ayt
l3KlykQBu33HLWuOiu2NcsWyiWW5Zqfv7SOj0DgVZuP+oR4VKu97hX/1nNF0tw8NaERZ
Y20eWHWFW77ZMZnsxbdRjIx86QkifybORbD7hFbkHMQuGhxmln3LfpzHED6yfp+T0m/u
32/5n7Pb/WtV+JzSGtCuZedqTwIT5Ju/m3OhNVd+VR5glzUIZQaWpwrIm1QNQ5Yne+8U
Rcoo5fOj1NVf/UyNLAh+S8gEFbIIuo2/CWLdLApUnTtgneZqyBqtu70Tb8To42Yqle+n
D2LA==
MIME-Version: 1.0
X-Received: by 10.50.22.210 with SMTP id g18mr21847979igf.19.1398083975593;
Mon, 21 Apr 2014 05:39:35 -0700 (PDT)
In-Reply-To: <CAA2C=vB7j86JhFsKTp_Z-+NXM2PT3XKbh7vRqEDt-8RJEo2zpw@mail.gmail.com>
References: <CAA2C=vBamXSU9Eh53WTLos=nemZs+uJ09QPF9Y8Jj4OSdZPsyQ AT mail DOT gmail DOT com>
<83vbu3cc6b DOT fsf AT gnu DOT org>
<CAA2C=vB7j86JhFsKTp_Z-+NXM2PT3XKbh7vRqEDt-8RJEo2zpw AT mail DOT gmail DOT com>
Date: Mon, 21 Apr 2014 15:39:35 +0300
Message-ID: <CAA2C=vCm0FgM3K7y3r+fRT_Bz+OpVOUqsivKb_3pGvKf7a-fMg@mail.gmail.com>
Subject: Re: ctime.c changes add about 4.5k more size
From: Ozkan Sezer <sezeroz AT gmail DOT com>
To: djgpp-workers AT delorie 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

On 4/21/14, Ozkan Sezer <sezeroz AT gmail DOT com> wrote:
> On 4/21/14, Eli Zaretskii <eliz AT gnu DOT org> wrote:
>>> 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?)
>>
>
> I can't do a quick line-by-line compare of old and new ctime.c and
> identify the offenders, if that's you are asking, the two are quite
> different.

FWIW, here is the long diff between versions 1.10 and 1.11 of ctime.c:
http://www.delorie.com/bin/cvsweb.cgi/djgpp/src/libc/ansi/time/ctime.c
http://www.delorie.com/bin/cvsweb.cgi/djgpp/src/libc/ansi/time/ctime.c.diff?r1=1.10&r2=1.11
... which adds more size to an already long time code.

- Raw text -


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