News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Symbols: pdb + ilk or embedded in the executable?

Started by jj2007, March 05, 2023, 09:27:59 AM

Previous topic - Next topic

jj2007

I get a stupid error message:
*** Link SimpleEd.obj rsrc.res  using polink, sub WINDOWS /debug ***
Writing debug information
POLINK: warning: Unrecognized CodeView symbols version (4) in object 'tinf.lib(Tmp_File.obj)'; ignored.
Compacting CodeView information
*** SimpleEd.exe: 489984 bytes ***


So I wanted to find a way to strip these symbols from tinf.lib (built with Pelles C), but searching in link, lib, polink and polib didn't satisfy my desire. Then I also realised that I haven't seen pdb or ilk files for quite, i.e. my symbols are always embedded in the exe. Why is that? Is there any option that determines whether symbols are embedded or "outsourced" to pdb files?

Stupid questions, I know, but I hope somebody can help me.

P.S.: Funnily enough, SOF claims "It is not possible to create an .exe or .dll that contains debug information. Debug information is always placed in a .obj or .pdb file."

HSE

There is a PellesC subforum!

Just erase "stupid" from text  :biggrin:
Equations in Assembly: SmplMath

jj2007


wjr

With POLINK the /debug option will include the debug information in the executable file, or the /DBG option (Project Options, Linker, Generate DBG file) creates a separate .dbg file with the debug information. As for the lib file, and in particular that Tmp_File.obj file, you could try a Pelles C build with the /Zd option (just COFF debug information) instead of /Zi.

TimoVJL

polink cw support is limited, as CodeView isn't documented well.
also version 11 use it's own debug format.
May the source be with you

jj2007

Thank you, Wayne and Timo. I've tried all combinations of options and linkers, and did not yet get what I want, i.e. no warning :sad:

Will keep trying...

wjr

To Compile the lib OBJ file, if you go to Project Options..., Compiler, Debug information: and set this to None and also on the toolbar select Release instead of Debug, this combination would appear to compile without the output of sections .debug$S and .debug$T which would contain CodeView or related Pelles C debug information.

jj2007

Thanks again, Wayne - you gave me a good idea: to launch PoIde.exe instead of using my usual batch file :biggrin:

So with "verbose build" I managed to see the winning options:

\Masm32\PellesC\Bin\pocc.exe -Tx86-coff -std:C17 -Ot -Ob1 -fp:precise -W1 -Gz -Zl tinfBuildLib.c -FoTinf.obj
\Masm32\PellesC\Bin\polib.exe  -out:Tinf.lib Tinf.obj

Plus Options/Compiler/Code generation: Omit default library name in object files (otherwise it complains about missing crt.lib)

It works, and the lib is even a lot shorter :thumbsup: