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 Subject: Re: ctime.c changes add about 4.5k more size In-reply-to: X-012-Sender: halo1 AT inter DOT net DOT il To: djgpp-workers AT delorie DOT com Message-id: <83vbu3cc6b.fsf@gnu.org> References: 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 Precedence: bulk > Date: Mon, 21 Apr 2014 09:44:12 +0300 > From: Ozkan Sezer > > Recent(ish) src/libc/ansi/time/ctime.c changes add about 4.5k more > size to the final stripped binary: > > #include > 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?)