delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/28/21:28:41

Date: Thu, 29 May 1997 12:36:19 -0700
From: Bill Currie <billc AT blackmagic DOT tait DOT co DOT nz>
Subject: Re: Size of executable too large.
To: Claude Sassine <claude AT tiac DOT net>
Cc: Help Djgpp <djgpp AT delorie DOT com>
Reply-to: billc AT blackmagic DOT tait DOT co DOT nz
Message-id: <338DDAB3.1EE2@blackmagic.tait.co.nz>
Organization: Tait Electronics NZ
MIME-version: 1.0
References: <338CF04B DOT EFB AT tiac DOT net>

Claude Sassine wrote:
> 
> I compiled a 699-byte file and got a 140KB executable. This led to look
> at the FAQ files. The FAQ mentions two possible remedies for the size
> problem. The -s switch brought the executable's size down to 68KB. The
> other option stated:
> 
> "If your program doesn't need parts of the startup code, it can be made
> smaller by defining certain functions with empty bodies.  These
> functions are `__crt0_glob_function', `__crt0_load_environment_file',
> and `__crt0_setup_arguments.'..."
> 
> I am not sure what is meant by empty bodies, supposedly:
> 
> #define __crt0_glob_function
> #define __crt0_load_environment_file
> #define __crt0_setup_arguments

No, what you need is:
__crt0_glob_function(){}
__crt0_load_environment_file(){}
__crt0_setup_arguments(){}

filled in with the correct return types and appropriate return
statements (can't remember off hand what they are).

Bill
-- 
Leave others their otherness.

- Raw text -


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