www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/09/03:15:29

Xref: news2.mv.net comp.os.msdos.djgpp:5758
Newsgroups: comp.os.msdos.djgpp
From: tob AT world DOT std DOT com (Tom Breton)
Subject: Re: Executable size
Message-ID: <Du95J1.4w9@world.std.com>
Reply-To: tob AT world DOT std DOT com
Organization: BREnterprises
References: <4rpd3d$l3u AT solaris DOT cc DOT vt DOT edu>
Date: Tue, 9 Jul 1996 01:30:37 GMT
Lines: 18
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

namille2 AT vt DOT edu (Matthew Miller) writes:
> What can be done about the large size of the executables
> produced by gcc?  A "hello world" program is bloated at
> 57kb. I used the -O switchs, but that produced no change.
> What can be done about this?

One thing you can easily do is to add:

void   __crt0_setup_arguments( void ) {}
void   __crt0_load_environment_file( char * unused ) {};

somewhere in the file (or in some file that you link in). This tells the
linker not to bother linking in some functionality you don't use in
"hello world". Obviously in progs that do use that, don't do that...

        Tom

- Raw text -


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