Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
to convert your output object fileto a raw binary file.This is only the basic option associated.You can find out more details to fit your situation by reading its man page.(The BFD library supports binary format.)
Why are you passing linker options if it's a relocatable linking? Remove the -T link.ld from the first two.
The third line indicates that stage3.o is a final link step, and yet you use it in the 4th line as if it was relocatable. Either make it relocatable (add -r, remove -T link.ld) or don't use it for kernel.bin.
Relocatable linking should usually be from the linkers default format to its default format, using default settings so that it doesn't remove any information required for linking. The final link step should indicate everything you want done to the files so that they end up being exactly right, so use a linker options file for that one.
Just a final thing, why link all these objects in 4 stages? Most people would link them all in one. It's good practice though...
Just a final thing, why link all these objects in 4 stages? Most people would link them all in one. It's good practice though...
I have much more files than this files but I'm trying to learn how
to link in many steps not one long line ,and also i know how can i link this
files in one single line.
THANX