From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Korn To: "'Pierre Saucourt-Harmel (r54698)'" , crossgcc@sourceware.cygnus.com Subject: RE: Build a short executable Date: Tue, 09 Jan 2001 08:17:00 -0000 Message-id: <718D38CAB6E0D011B2C90060970C28A5642589@EXCHANGESERVER> X-SW-Source: 2001-01/msg00063.html >-----Original Message----- >From: Pierre Saucourt-Harmel (r54698) >I removed the -g option to generate the cross libraries >(libg.a and libgcc.a) but not for my small files. I used -o2 >everywhere and I obtained an executable file of 132656 bytes ! Did you try using the 'strip' command from binutils on the output ? You'd be surprised how much difference it might make. It will be the main reason why your exe is so large. >With the generated map, I noticed more than 20 objects files >coming from libg.a and libgcc.a were *fully* loaded in my executable. Yes, but each of those files is very small; by and large, each one contains just one or two functions, for this very reason: so that only the minimum that needs to be linked in will be. Looking at your list, it's got things like malloc and free, open, close, read and write; I assume your program wants to use these functions ? DaveK -- The Boulder Pledge: "Under no circumstances will I ever purchase anything offered to me as the result of an unsolicited email message. Nor will I forward chain letters, petitions, mass mailings, or virus warnings to large numbers of others. This is my contribution to the survival of the online community." ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Korn To: "'Pierre Saucourt-Harmel (r54698)'" , crossgcc@sourceware.cygnus.com Subject: RE: Build a short executable Date: Sun, 01 Apr 2001 00:00:00 -0000 Message-ID: <718D38CAB6E0D011B2C90060970C28A5642589@EXCHANGESERVER> X-SW-Source: 2001-q1/msg00063.html Message-ID: <20010401000000.gxonqsQL4modbjBTIYeoq1gvjarSOOY9y-T_OlOk4o8@z> >-----Original Message----- >From: Pierre Saucourt-Harmel (r54698) >I removed the -g option to generate the cross libraries >(libg.a and libgcc.a) but not for my small files. I used -o2 >everywhere and I obtained an executable file of 132656 bytes ! Did you try using the 'strip' command from binutils on the output ? You'd be surprised how much difference it might make. It will be the main reason why your exe is so large. >With the generated map, I noticed more than 20 objects files >coming from libg.a and libgcc.a were *fully* loaded in my executable. Yes, but each of those files is very small; by and large, each one contains just one or two functions, for this very reason: so that only the minimum that needs to be linked in will be. Looking at your list, it's got things like malloc and free, open, close, read and write; I assume your program wants to use these functions ? DaveK -- The Boulder Pledge: "Under no circumstances will I ever purchase anything offered to me as the result of an unsolicited email message. Nor will I forward chain letters, petitions, mass mailings, or virus warnings to large numbers of others. This is my contribution to the survival of the online community." ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com