PE executable problem
Posted: Sat Jan 31, 2009 4:01 pm
Hey everyone,
I am not quite sure where the problem might be here. I am trying to properly execute a PE executable. I have the file loaded into memory, and have gotten both the image base and entry point address from the loaded file. The image base + entry point address also is the same as what I expect it to be (According to the linker map.) I have verified all of this to be true using the bochs debugger and my compiliers linker map.
Everything is fine...except the entry point is actually not there at the expected address thus it crashes. I have verified this using the bochs debugger. When I checked the real location in memory of the address point using the debugger, it was at base + 0x400 which I find odd.
Does this have to do with alignment in some way? Where do you think the problem might be at? I have been stuck on this for a few days and just cannot seem to find the cause of it. Because I don't know the cause I don't know where to begin looking for a solution.
Any help is appreciated. I am also willing to post code if needed if you let me know what code you want to see.
I am not quite sure where the problem might be here. I am trying to properly execute a PE executable. I have the file loaded into memory, and have gotten both the image base and entry point address from the loaded file. The image base + entry point address also is the same as what I expect it to be (According to the linker map.) I have verified all of this to be true using the bochs debugger and my compiliers linker map.
Everything is fine...except the entry point is actually not there at the expected address thus it crashes. I have verified this using the bochs debugger. When I checked the real location in memory of the address point using the debugger, it was at base + 0x400 which I find odd.
Does this have to do with alignment in some way? Where do you think the problem might be at? I have been stuck on this for a few days and just cannot seem to find the cause of it. Because I don't know the cause I don't know where to begin looking for a solution.
Any help is appreciated. I am also willing to post code if needed if you let me know what code you want to see.