I am reading this book :
http://www.iecc.com/linker/linker05.html. It says:
"Non-global symbols, usually for debuggers and crash dump analysis. These aren't really symbols needed for the linking process, but sometimes they are mixed in with global symbols so the linker has to at least skip over them. In other cases they can be in a separate table in the file, or in a separate debug info file."

For VC++ What is the procedure for cretaing pdb file and symbol table.
If i compile in debug mode.
1-) First compiler generate symbol table and put it in .obj file.
2-) Linker generate .pdb file and exe by using symbol table in .obj file. (but exe doent include symbol table)

or in debug mode linker doesnt destroy symbol table in obj file. Also it puts symbol table in exe.

So Are there 2 symbol tables both in exe and pdb file? Or one only in pdb file?
Which one is true? Or what is the compiling and linking procedure in VC++ (VS2005) ?
Thank you
Posted on 2007-02-27 06:20:55 by sawer
Afaik if you opt to use a .pdb file, all debug info goes in there.
Posted on 2007-02-27 06:25:27 by f0dder
I created 2 win32 windows projects. I compiled one of them release mode one of them debug mode.
For release mode MSDN says:

A release build uses optimizations. When you use optimizations to create a release build, the compiler will not produce symbolic debugging information. The absence of symbolic debugging information, along with the fact that code is not generated for TRACE and ASSERT calls, means that the size of your executable file is reduced and will therefore be faster.

But in release mode VS 2005 generate .pdb file. But does not generate Incremental Linker File(.ilk). The sizes are:
Exe= 64,0 K;  .pdb file = 443 KB
For debug mode sizes:
Exe= 100 K; .pdb file= 643K .ilk file = 348 K

I still understand what Vc++  do while compiling and linking in release and debug mode.

I installed symbol package and i am using symbol file in C:\WINDOWS\Symbols local hard drive. I dont think this will be problem. But still dont understand what VC++ do.
Thank you. 
Posted on 2007-02-27 09:46:01 by sawer
Yes, by default it generates .pdb in release mode as well, so you can still have symbolic info on crashes - you can turn this off if you want, but the .pdb file reference doesn't take up much space in your exe, doesn't have security implications, and can be very useful if you need to debug a crash in a release exe for a customer.
Posted on 2007-02-27 19:38:11 by f0dder