Page 1 of 1

COFF link

Posted: Fri Jun 27, 2003 1:37 am
by be
How can I copy multiple COFF .o files into one big .o file without linking with DJGPP? I want to make one big .o file which will be linked with other small one to the elf later. But ld does not understand and says that he does not know function I call (which declared in the last small .o file). :-[

Re:COFF link

Posted: Fri Jun 27, 2003 3:01 am
by Pype.Clicker
you could link them with using some special flag (-r iirc for incremental linking), which makes it keep relocation & stuff.

Re:COFF link

Posted: Fri Jun 27, 2003 5:21 am
by Tim
Alternatively, you could put all the object files in a library:

Code: Select all

ar rcs libkernel.a file1.o file2.o file3.o
ld -o kernel startup.o main.o libkernel.a