Click here to Skip to main content
15,879,096 members
Articles / Desktop Programming / MFC
Article

Removing debug information from .obj files

Rate me:
Please Sign up or sign in to vote.
1.67/5 (3 votes)
3 May 2000 52.7K   373   13   4
A small program for removing debug information from object files that aids incrementally linking extremely large projects.
  • Download source files - 4 Kb
  • Introduction

    I'm working on a large project where I found Visual C limits 4095/6 sources with debug information for use in incremental linking. I wanted to remove the debug information from the .obj files that I did not need to step into, so I wrote a quick program.

    This program removes debug information from most .obj files (some cases are not covered, in which the program will not create obj file and will return an error code), which is quicker (minimaly 5-6 times) than creating two .obj files (note that mixing debug and release .obj's is not good idea).

    Usage

    objstrip.exe input.obj output.obj

    Notes

    • Compiling: you MUST use struct member alignment 1 byte!
    • libs: some libs contain not .obj files but .dll's (libraries for comunication with dll/list of exported functions)
    • source: see comments inside source: This program is provided as is with NO guarantee. It works with VC5 and VC6. Improvements are welcomed. It does not work with 100% of objects (ignores more complex mixing of data/code and debug information, see source). It exists for anyone for whom this source is usable. If there is anyone for whom this source is usable then I would love to hear from you.

    License

    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here


    Written By
    Software Developer (Senior)
    Slovakia Slovakia
    This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

    Comments and Discussions

     
    GeneralError: IMAGE_SCN_LNK_COMDAT found Pin
    AlexeiKireev31-Jul-05 21:50
    AlexeiKireev31-Jul-05 21:50 
    GeneralRe: Error: IMAGE_SCN_LNK_COMDAT found Pin
    Tibor Blazko31-Jul-05 22:04
    Tibor Blazko31-Jul-05 22:04 
    GeneralRe: Error: IMAGE_SCN_LNK_COMDAT found Pin
    AlexeiKireev2-Aug-05 20:51
    AlexeiKireev2-Aug-05 20:51 
    GeneralRe: Error: IMAGE_SCN_LNK_COMDAT found Pin
    Tibor Blazko2-Aug-05 20:54
    Tibor Blazko2-Aug-05 20:54 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.