mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
bindexplib: Skip symbols containing a dot (.)
Symbols including a dot are not valid and result in a `LNK1242` error when trying to create a library from the def file. Such symbols happen to be in object files when using PGI Fortran on Windows and compiling with debug symbols enabled. Those symbols do not need to be exported.
This commit is contained in:
committed by
Brad King
parent
1867856f6a
commit
8d754ad5e7
@@ -251,13 +251,16 @@ public:
|
||||
SectChar = this->SectionHeaders[pSymbolTable->SectionNumber - 1]
|
||||
.Characteristics;
|
||||
|
||||
if (SectChar & IMAGE_SCN_MEM_EXECUTE) {
|
||||
this->Symbols.insert(symbol);
|
||||
} else if (SectChar & IMAGE_SCN_MEM_READ) {
|
||||
// skip __real@ and __xmm@
|
||||
if (symbol.find("_real") == std::string::npos &&
|
||||
symbol.find("_xmm") == std::string::npos) {
|
||||
this->DataSymbols.insert(symbol);
|
||||
// skip symbols containing a dot
|
||||
if (symbol.find('.') == std::string::npos) {
|
||||
if (SectChar & IMAGE_SCN_MEM_EXECUTE) {
|
||||
this->Symbols.insert(symbol);
|
||||
} else if (SectChar & IMAGE_SCN_MEM_READ) {
|
||||
// skip __real@ and __xmm@
|
||||
if (symbol.find("_real") == std::string::npos &&
|
||||
symbol.find("_xmm") == std::string::npos) {
|
||||
this->DataSymbols.insert(symbol);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user