summaryrefslogtreecommitdiffstats
path: root/Source/bindexplib.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/bindexplib.cxx')
-rw-r--r--Source/bindexplib.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/bindexplib.cxx b/Source/bindexplib.cxx
index 52e200c..3495aed 100644
--- a/Source/bindexplib.cxx
+++ b/Source/bindexplib.cxx
@@ -281,6 +281,7 @@ public:
// the symbol
const char* scalarPrefix = "??_G";
const char* vectorPrefix = "??_E";
+ const char* vftablePrefix = "??_7";
// The original code had a check for
// symbol.find("real@") == std::string::npos)
// but this disallows member functions with the name "real".
@@ -302,7 +303,8 @@ public:
this->DataSymbols.insert(symbol);
} else {
if (pSymbolTable->Type || !(SectChar & IMAGE_SCN_MEM_READ) ||
- (SectChar & IMAGE_SCN_MEM_EXECUTE)) {
+ (SectChar & IMAGE_SCN_MEM_EXECUTE) ||
+ (symbol.compare(0, 4, vftablePrefix) == 0)) {
this->Symbols.insert(symbol);
}
}
@@ -406,7 +408,7 @@ static bool DumpFile(std::string const& nmPath, const char* filename,
LPVOID lpFileBase;
hFile = CreateFileW(cmsys::Encoding::ToWide(filename).c_str(), GENERIC_READ,
- FILE_SHARE_READ, NULL, OPEN_EXISTING,
+ FILE_SHARE_READ, nullptr, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, 0);
if (hFile == INVALID_HANDLE_VALUE) {
@@ -414,7 +416,8 @@ static bool DumpFile(std::string const& nmPath, const char* filename,
return false;
}
- hFileMapping = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL);
+ hFileMapping =
+ CreateFileMapping(hFile, nullptr, PAGE_READONLY, 0, 0, nullptr);
if (hFileMapping == 0) {
CloseHandle(hFile);
fprintf(stderr, "Couldn't open file mapping with CreateFileMapping()\n");