I want compile only executive part, without exe-header. What parameters i must add to command string?
ArtemESC,
Do you mean like a .DLL file?
Boucly
Boucly, like com-file...
32 or 16 bit code?
You'll need a different linker, as the microsoft one creates 'headered' formats. Though you can get 16-bit code into a .com file using the old 16-bit linker.
Tedd, Masm 6.13...
That would be your version of "ml.exe" - the assembler.
You need an older version of "link.exe" - the linker. (Assuming 16-bit code)
If you're trying to build code without the exe structure, then do you want to produce .com files, or are you working on something like an OS?
For .com files, you need the older (16-bit) linker. For OS you'll want a assembler/linker which outputs 32-bit raw binaries (such as nasm, or fasm.)
Are not .OBJ files just code without PE formatting?
No, they have sections and symbols and what-not. It shouldn't be too difficult to extract just the code and data parts, but there will still be some 'linking' to do, even if it's just fixing pointers and function calls.
For com file, if i understand well what is needed , there is a special package in this forum.
See The upper right corner of this site,you fill find what you want.
Com files have a header (100 bytes) but with some options,that ml give you probably by "ml /?".
I have made it there is a long time but it is possible.
The code start at offset 0 without header like a listing.
ToutEnmasm
With 32 bits the technique is useful to inject code in an executable and is the first technique usable by an aprentice to write a virus.
Hopefully for us , this technique is well known by the actual antivirus that treat this well.
ToutEnMasm
Quote from: Tedd on August 18, 2006, 11:40:09 AM
No, they have sections and symbols and what-not. It shouldn't be too difficult to extract just the code and data parts...
Sorry Tedd, I was being facetious. :bg
I should have stated that more clearly. :)