Mail Archives: djgpp/1997/09/29/01:29:24
>On Wed, 20 Aug 1997 baldo AT chasque DOT apc DOT org wrote:
>
>> > 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 curios cuestion: 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 funcions in the linker. Maybe
this is not possible. If not why not? Goodbye!
Ivan Baldo: baldo AT chasque DOT apc DOT org - http://www.chasque.apc.org/baldo
- Raw text -