COFF link
COFF link
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). :-[
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:COFF link
you could link them with using some special flag (-r iirc for incremental linking), which makes it keep relocation & stuff.
Re:COFF link
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