OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 5:08 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: COFF link
PostPosted: Fri Jun 27, 2003 1:37 am 
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). :-[


Top
  
 
 Post subject: Re:COFF link
PostPosted: Fri Jun 27, 2003 3:01 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 2:31 am
Posts: 5964
Location: In a galaxy, far, far away
you could link them with using some special flag (-r iirc for incremental linking), which makes it keep relocation & stuff.

_________________
Image May the source be with you.


Top
 Profile  
 
 Post subject: Re:COFF link
PostPosted: Fri Jun 27, 2003 5:21 am 
Alternatively, you could put all the object files in a library:
Code:
ar rcs libkernel.a file1.o file2.o file3.o
ld -o kernel startup.o main.o libkernel.a


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 69 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group