News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Binary to MS COFF object file converter

Started by Vortex, December 11, 2018, 05:47:34 AM

Previous topic - Next topic

Vortex

This tool converts any binary file to a linkable MS COFF object file. The new version can create 64-bit MS COFF object modules.

Usage :
   bin2coff srcfile.ext output.obj label architecture

srcfile.ext :   Any kind of binary file

output.obj :   The name of the object file
label :   A label name presenting the embedded binary data to the linker
                            Notice that the label should be prefixed with an underscore depending
                            on the calling convention of your development tools.

        architecture    :   32 or 64 depending on the target platform


Asmc, Poasm and Uasm are providing the INCBIN statement to embed binary files into object modules. Since Masm does not provide any command like INCBIN for this purpose, I decided to code this small tool.

felipe


sinsi

Thanks for the source (I'm looking into obj and lib files at the moment).
One problem, CreateFile returns -1, not 0 on error.

hutch--

Thanks for these Erol, there is some interesting code here.


Siekmanski

Creative coders use backward thinking techniques as a strategy.

TimoVJL

May the source be with you

Vortex

Hello,

Many thanks. The CreateFile issue is fixed. New upload at the top.