mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 06:40:16 -05:00
Merge topic 'remove_cli__symbols'
be75622e49 bindexplib: Do not export symbols from managed code
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4692
This commit is contained in:
+10
-2
@@ -276,8 +276,9 @@ public:
|
||||
symbol.compare(0, 4, vectorPrefix)) {
|
||||
SectChar = this->SectionHeaders[pSymbolTable->SectionNumber - 1]
|
||||
.Characteristics;
|
||||
// skip symbols containing a dot
|
||||
if (symbol.find('.') == std::string::npos) {
|
||||
// skip symbols containing a dot or are from managed code
|
||||
if (symbol.find('.') == std::string::npos &&
|
||||
!SymbolIsFromManagedCode(symbol)) {
|
||||
if (!pSymbolTable->Type && (SectChar & IMAGE_SCN_MEM_WRITE)) {
|
||||
// Read only (i.e. constants) must be excluded
|
||||
this->DataSymbols.insert(symbol);
|
||||
@@ -302,6 +303,13 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
bool SymbolIsFromManagedCode(std::string const& symbol)
|
||||
{
|
||||
return symbol == "__t2m" || symbol == "__m2mep" || symbol == "__mep" ||
|
||||
symbol.find("$$F") != std::string::npos ||
|
||||
symbol.find("$$J") != std::string::npos;
|
||||
}
|
||||
|
||||
std::set<std::string>& Symbols;
|
||||
std::set<std::string>& DataSymbols;
|
||||
DWORD_PTR SymbolCount;
|
||||
|
||||
Reference in New Issue
Block a user