News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Masm parameters...

Started by ArtemESC, August 17, 2006, 12:21:16 PM

Previous topic - Next topic

ArtemESC

I want compile only executive part, without exe-header. What parameters i must add to command string?

Boucly

ArtemESC,

Do you mean like a .DLL file?

Boucly

ArtemESC


Tedd

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.
No snowflake in an avalanche feels responsible.

ArtemESC


Tedd

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.)
No snowflake in an avalanche feels responsible.

Mark Jones

Are not .OBJ files just code without PE formatting?
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

Tedd

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.
No snowflake in an avalanche feels responsible.

ToutEnMasm


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

                         

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

Mark Jones

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. :)
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08