pe exe
Re:pe exe
AFIAK, the best source of information about loading executables is the book Linkers and Loaders; an early version of which can be found online.
Details of the PE format itself can be gotten from Microsoft's website. A more basic overview can be found on MSDN.
You may want to read reply #6 in this thread first, for a quick explanation of the principles of relocatable file formats. HTH.
Details of the PE format itself can be gotten from Microsoft's website. A more basic overview can be found on MSDN.
You may want to read reply #6 in this thread first, for a quick explanation of the principles of relocatable file formats. HTH.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:pe exe
if it doesn't have unresolved links, yes ... otherwise, you might also need to load DLLs first and link the EXE with those DLLs ...
Re:pe exe
In the kernel: There won't be unresolved links, unless you wanted there to be.
In applications: The import directory (see the PE format spec) tells you which DLLs the application references, and which functions it wants in those DLLs.
So:
For each DLL in the import directory
Load the DLL
For each function imported from that DLL
Look up the export from the DLL
Put a pointer to the export into the import address table
End For
End For
In applications: The import directory (see the PE format spec) tells you which DLLs the application references, and which functions it wants in those DLLs.
So:
For each DLL in the import directory
Load the DLL
For each function imported from that DLL
Look up the export from the DLL
Put a pointer to the export into the import address table
End For
End For