delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/07/04:02:42

From: baldo AT chasque DOT apc DOT org
Message-Id: <3.0.1.32.19971007045314.0068c780@chasque.apc.org>
Date: Tue, 07 Oct 1997 04:53:14 -0300
To: djgpp AT delorie DOT com
Subject: OBJECTS, LIBRARIES, CODE SIZE, ETC.
Mime-Version: 1.0

>> >		gcc -o myprog.exe f1.c f2.c mylib.a
>> >
>> >The linker will only link in the functions that your program calls.
>> 	Hello Eli. Are you sure about that? It does not include all the entire
>> object file and not the library? I think it works in an object file basis:
>> if the program needs only a function of an object file, it includes all the
>> object file.
>
<Yes, you are right.  That's why I also said to put every function on
<its own source file.  That way, every object file will have only one
>function.

	Hello. Now I have a curious question: why a lot of compilers canīt remove
individual functions from an object file? It would be nice to add a switch
to DJGPP to remove unused individual object functions in the linker. Maybe
this is not possible. If not why not? Goodbye!

P.S.: I have changed the subject and repost this again because I have not
received any answers, sorry. Original subject: "Re: Changes size of exe or
not?". I will not repost this again if I not get any answers, donīt worry.

Ivan Baldo: baldo AT chasque DOT apc DOT org - http://www.chasque.apc.org/baldo


- Raw text -


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