Why does DumpBin tell me there are no COMDATs in my binaries?

This is the result that I get from dumpbin AchievementsTable.obj /HEADERS

 Microsoft (R) COFF/PE Dumper Version 8.00.50727.762 Copyright (C) Microsoft Corporation. All rights reserved. Dump of file AchievementsTable.obj File Type: ANONYMOUS OBJECT ANON OBJECT HEADER VALUES 1 version 14C machine (x86) 4C51334D time date stamp Thu Jul 29 08:52:45 2010 ClassID: {0CB3FE38-D9A5-4DAB-AC9B-D6B6222653C2} 945F size 0 flags 

ALL my source does this. I am using VisualStudio 2005. I know that there are many COMDATs exported since .exe subsequently references and performs correctly: are there compiler switches that I should avoid? Here are the ones I use:

 /O1 /Ob2 /Oi /GT /GL /I "..\dxsdk\include" <lots of include paths> /D "WIN32" <lots of #defines> /GF /FD /MT /GS- /Gy /arch:SSE2 /fp:fast /GR- /Fo <directory specified> /Fd <pdb filename specified> /FR <directory specified> /W4 /c /Zi /TP .\Source\databases\AchievementsTable.cpp 

I am open to comments on my selection in general, but using DumpBin is the focus of this issue: pick it up, boys and girls ...

+4
source share
1 answer

After a day of troubleshooting, I found that the DUMPBIN documentation is a bit ambiguous.

To get COMDAT output, you need to enable function level communications (/ Gy). Enabling cross-module optimization (/ GL) delays the generation of code for timing. Therefore, although it is true that header information is available for code compiled with / GL, it is very limited. That's why this is the only option available for DUMPBIN - all other options require additional information, the generation of which is delayed by / GL.

+7
source

All Articles