delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2014/04/21/02:44:35

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:date:message-id:subject:from:to:content-type;
bh=q82RKbMfKORvlWwTmXtTQykebApDWn1sPadzmERkacQ=;
b=gmVG9PQqUmRtzEA8PwLD/FNQ5H/mAtaSKB1JIvEg0yV2SUBDmb/aMJy4xdFgooRzyh
P4051N/O2CtQZwdMpAutRT+zJ7hTBifSKv8Si0BMJgfuH2P5SIzN2piiqfbh3rZoF+dJ
yATSprq1n+fy5XPXmz/qUcIv7EKWVCnsxF66cnd5a3eLoE1Wt/cd/M9cm2bPCf+Uv+Oo
oWwdGwjQXw8EOEmHL7PnU6NNXysF6hOL2il2chYKMeKbZuyFjQ74JTx5gEnUIX4WYQPq
6ao5cE3NR9RGdjDyZGXwUEtTC6ljXSM8+E3s+vlRlytFboXflCdA3ep454GAMy/cPgjJ
gYUg==
MIME-Version: 1.0
X-Received: by 10.50.136.168 with SMTP id qb8mr20467538igb.13.1398062652168;
Sun, 20 Apr 2014 23:44:12 -0700 (PDT)
Date: Mon, 21 Apr 2014 09:44:12 +0300
Message-ID: <CAA2C=vBamXSU9Eh53WTLos=nemZs+uJ09QPF9Y8Jj4OSdZPsyQ@mail.gmail.com>
Subject: ctime.c changes add about 4.5k more size
From: Ozkan Sezer <sezeroz AT gmail DOT com>
To: djgpp-workers <djgpp-workers AT delorie DOT com>
Reply-To: djgpp-workers AT delorie 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?

--
O.S.

- Raw text -


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