delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2014/04/21/05:12:53

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=YNesWmDcmaDB+P9UorMp7dC5PQfNq+y9V2AQksEC57Y=;
b=PjA7BjnNFZouZ4MgzFwO8bmNBaAiNIEqDKYZ5Tywr2P4XEmJSiRj/s8ro4XOMujAEt
npcLQvxTBlyfJCqGsTQOxvd/vXWpiztYzwYEDj4u5OSvpMu/UMFrvJh3cpGeCMT6ttEF
NynNWzPCHVIeaI9MZuG5jQLhL2Tc0ybZAMsBX5/o+VkP6WuxY4PqobbFyBe2WIz5bk8a
Vo7dnl2jrhDyKAS/vCE3FxzbZYIDqZqbeVmG2+0qi5kmIw5AsKSgD8tAm4EGg0EfNVuw
zjR/BnF9+momoFDfSYP8cc0j8Wl+E+eI1JjN4ra404d+ly9gCs6O6cN1YOpHw6LUVL4g
wmzA==
MIME-Version: 1.0
X-Received: by 10.50.22.210 with SMTP id g18mr20852246igf.19.1398071565296;
Mon, 21 Apr 2014 02:12:45 -0700 (PDT)
In-Reply-To: <83vbu3cc6b.fsf@gnu.org>
References: <CAA2C=vBamXSU9Eh53WTLos=nemZs+uJ09QPF9Y8Jj4OSdZPsyQ AT mail DOT gmail DOT com>
<83vbu3cc6b DOT fsf AT gnu DOT org>
Date: Mon, 21 Apr 2014 12:12:45 +0300
Message-ID: <CAA2C=vB7j86JhFsKTp_Z-+NXM2PT3XKbh7vRqEDt-8RJEo2zpw@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, 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.

--
O.S.

- Raw text -


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