Mail Archives: djgpp/1997/10/07/04:02:42
>> > 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 -