Re: Unwanted PRIVATE symbols in masm obj file



On Mar 29, 1:11 pm, spamt...@xxxxxxxxxx wrote:
Hi Robert,

This was sort of a security issue.

I needed to send an OBJ file to someone, but didn't want
him to see the names of ALL procedures, only the public ones.

The solution I came up with is:

first, assemble the file to OMF format, then give it to this BAT file:
lib %1.obj
lib /EXTRACT:%1.obj %1.lib
del %1.lib

This is, basically, OMF2COFF with the tools I have handy.


Actually, MSLINK will automatically convert OMF files to COFF files
during the linking process, so you shouldn't need to do even this
(assuming you're using a reasonably recent version of the linker).

Do keep in mind, however, that if you're distributing .obj files,
security is almost a non-issue as they are *very* easy to disassemble.
If the particular name of the function is an issue, just use
conditional assembly in your source file to change the name for actual
release (e.g., use a textequ inside conditional assembly to change the
name of the procedure everywhere it appears in the program).
Cheers,
Randy Hyde

.



Relevant Pages

  • Re: Unwanted PRIVATE symbols in masm obj file
    ... This was sort of a security issue. ... I needed to send an OBJ file to someone, ... lib /EXTRACT:%1.obj %1.lib ...
    (comp.lang.asm.x86)
  • Re: C module wont link to my MFC project
    ... JongAm Park wrote: ... you added an obj file or a lib file which is a C-module into your VC 2003 project. ... Then in the object file, whether it is obj or lib, your function will be written "crcCalc". ... To be able to call the "C" function, you need to embrace the lines in the header file this way. ...
    (microsoft.public.vc.ide_general)
  • Re: Linking multiple .LIB files for override of function
    ... The way the linker works is not just the first the .lib ... In this sense, if our client exe first calls funcoverride, it will use ... That's why linking the myspeical.lib's ... obj file ensures that myspecial.lib!funoverride is used. ...
    (microsoft.public.vc.ide_general)
  • Re: tcp/ip with msclient
    ... for DJGPP equivalent to DOS_SOCK.LIB from MS Socket Development Kit. ... I had a look at the MS Sockets Development Kit and tried to use the .lib in a test build using djgpp. ... there's no easy way to convert a .obj file to .o. ...
    (comp.os.msdos.djgpp)
  • Re: Copy Auditing Journals?
    ... How can i, copy and rename,  old Auditing Journals from QGPL to a lib ... jrns to lib SECURITY be default. ...
    (comp.sys.ibm.as400.misc)