Removing PE+ Headers

Posts 1–7 of 7 · Page 1 of 1
Removing PE+ Headers
Is it possible to remove PE+(x64/Win64) headers from executables to get flat binary 64-bit code? I want to use Masm to code a 64-bit kernel, because it's syntax is simpler than a lot of other assemblers, and because I want to use Visual Studio 2010 with microsoft's compiler so if there's a way to remove PE+ headers I'll have to do that right? As far as I know, Visual Studio will only compile for Windows, right? I wasn't sure which section to post this in, but I'll be writing more C/C++ than Assembly so I figured this would work. Also, what's a good 64-bit Assembler that can output flat binary if I can't use Masm, and should I be using CodeBlocks instead of VS2010?
@Jason: Might be able to help. He knows about PE.
Masm is a assembler not a compiler. Do you want to remove the headers from the executable, or build the binary without pe64+ headers?
I know Masm isn't a compiler, it's just simpler to call it "compiling" for me because I spend 90% of my time using C++ and C#. I want to know if Masm can produce flat binary, or do you have to modify the executable, or take the PE/PE+ header out? I don't know very much about the output formats, and I can't find good documentation for Masm. What I'd like to do is learn about writing operating systems, can someone point me in the right direction?
Operating Systems Development Series <- he makes some spelling and grammar mistakes which become very annoying after a time, but his tutorials are clear overall and he uses illustration to explain more complex subjects. I used his tutorials to make my own bootloader in asm (with fasm) and then continue building the kernel in C++ with VC++2005. Good luck!
Schim, what formats can vc++ output? I thought it only compiled to windows executables or something?
Yes, it only compiles pe executables, but if you compile your application without any standard c libraries or windows dependent code, you can simply parse or hard code the address of entry point in your bootloader and start from there.

He explains (and provides a demo) here: Operating Systems Development Series
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us