65.9K
CodeProject is changing. Read more.
Home

Removing debug information from .obj files

starIcon
emptyStarIcon
starIcon
emptyStarIconemptyStarIconemptyStarIcon

1.67/5 (3 votes)

May 4, 2000

viewsIcon

53264

downloadIcon

376

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.