Skip to content

Commit 79b4ab1

Browse files
committed
Export non comdat read onyl symbols
1 parent 6ed2c9b commit 79b4ab1

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

DefFileGenerator/bindexplib.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,10 @@ class DumpSymbols
311311
symbol.find("$iexit_thunk") == std::string::npos &&
312312
symbol.find("$exit_thunk") == std::string::npos)) {
313313
if (!pSymbolTable->Type && (SectChar & IMAGE_SCN_MEM_WRITE)) {
314-
// Read only (i.e. constants) must be excluded
314+
this->DataSymbols.insert(symbol);
315+
} else if ((SectChar & IMAGE_SCN_MEM_READ) && !
316+
(SectChar & IMAGE_SCN_LNK_COMDAT)) {
317+
// Read only (i.e. constants) only included if not COMDAT
315318
this->DataSymbols.insert(symbol);
316319
} else {
317320
if (pSymbolTable->Type || !(SectChar & IMAGE_SCN_MEM_READ) ||
1.5 KB
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)