Linking an executable
I'm trying to figure out how to manually link an ELF file. 开发者_JAVA技巧 I am aware of the file structure, but how do I determine the order in which the relocatable objects are to be linked?
Start with the object containing the entry point. Resolve its internal references. Then take first unresolved reference. Find the object defining an unresolved reference and link it in. Resolve all references you can now. If there are still unresolved references, repeat the process. Something like this...
精彩评论