summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-07-10 18:54:30 (GMT)
committerBrad King <brad.king@kitware.com>2017-07-10 18:54:30 (GMT)
commit6fba4ec0f55ffec4ee6939b3eca0eac47ca4a02f (patch)
tree38d943e37b769ea448e953ee2103a67b92e293aa /Source
parentdd69dea3e7456cf8ea7e5d60362f6f8aa7aafa48 (diff)
parent3250b9a122a19a840f63868a244832c24528d54a (diff)
downloadCMake-6fba4ec0f55ffec4ee6939b3eca0eac47ca4a02f.zip
CMake-6fba4ec0f55ffec4ee6939b3eca0eac47ca4a02f.tar.gz
CMake-6fba4ec0f55ffec4ee6939b3eca0eac47ca4a02f.tar.bz2
Merge branch 'bindexplib-revert-consts' into release-3.9
Diffstat (limited to 'Source')
-rw-r--r--Source/bindexplib.cxx22
1 files changed, 12 insertions, 10 deletions
diff --git a/Source/bindexplib.cxx b/Source/bindexplib.cxx
index cd1fb8a..e96226a 100644
--- a/Source/bindexplib.cxx
+++ b/Source/bindexplib.cxx
@@ -242,24 +242,26 @@ public:
// Check whether it is "Scalar deleting destructor" and "Vector
// deleting destructor"
- // if scalarPrefix and vectorPrefix are not found then print the
- // symbol
+ // if scalarPrefix and vectorPrefix are not found then print
+ // the symbol
const char* scalarPrefix = "??_G";
const char* vectorPrefix = "??_E";
+ // The original code had a check for
+ // symbol.find("real@") == std::string::npos)
+ // but this disallows member functions with the name "real".
if (symbol.compare(0, 4, scalarPrefix) &&
symbol.compare(0, 4, vectorPrefix)) {
SectChar = this->SectionHeaders[pSymbolTable->SectionNumber - 1]
.Characteristics;
-
// 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);
+ if (!pSymbolTable->Type && (SectChar & IMAGE_SCN_MEM_WRITE)) {
+ // Read only (i.e. constants) must be excluded
+ this->DataSymbols.insert(symbol);
+ } else {
+ if (pSymbolTable->Type || !(SectChar & IMAGE_SCN_MEM_READ) ||
+ (SectChar & IMAGE_SCN_MEM_EXECUTE)) {
+ this->Symbols.insert(symbol);
}
}
}