Page 1 of 1

Weird linker!

Posted: Thu Jul 01, 2004 5:13 pm
by Beginner
as I made a new function, of course I made a new file.. the problem is that when I try to link it with:
ld -T link.ld -o kernel.bin ALl the files
it says "Cannot run the program" or something..and I am able to compile the files and there?s nothing different in this new file from my old.. I just cant link it for some reason.. really need help

Re:Weird linker!

Posted: Thu Jul 01, 2004 7:27 pm
by Beginner
As I thought, it seems like you cant use as many arguments as you?d like to (win xp)... but that?s a problem, I pass the files as arguments to the linker, and I need to pass lots and lots of files

Re:Weird linker!

Posted: Fri Jul 02, 2004 1:00 am
by Solar
How about:

ld -T link.ld -o kernel.bin *.o

Or even better, use 'ar' to combine multiple object files into a linker archive...