The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: msqweasm on June 02, 2011, 12:54:40 PM

Title: Preventing MASM From Decorating My Proc Names
Post by: msqweasm on June 02, 2011, 12:54:40 PM
I am using the compiler generated asm files as the starting point for further editing.  But the compiler generated proc names are all decorated names and it seems that MASM would further carry out its own name decoration.  Can I prevent MASM from doing this duplicated name decoration?

I want to have the compiler generates the asm files.  I'll then edit it myself and generate another separate obj module for the related functions.  I'll not touch the proc names to "undecorate" them.  Then my C++ functions will link to my new customized obj file assembled by MASM having function names in decorated form generated by the compiler.  But my last step would fail if the MASM carry out another name decoration.
Title: Re: Preventing MASM From Decorating My Proc Names
Post by: hutch-- on June 02, 2011, 02:13:19 PM
Bothy ML and CL will decorate names with the right calling convention so you are probably stuck with editing the leading underscore out of the file you want to build with ML.
Title: Re: Preventing MASM From Decorating My Proc Names
Post by: Vortex on June 02, 2011, 06:25:56 PM
Hi msqweasm,

You can use Agner Fog's Object file converter to undecorate function names in your object modules :

http://agner.org/optimize/objconv.zip

The MS COFF object file undecorator (http://www.masm32.com/board/index.php?topic=6518.0) does a similar job.