versioner: whitelist atexit, turn on symbol checking by default.
Change-Id: I32e726c74ee618ace3a4329d46408a42732a8d9d
diff --git a/tools/versioner/src/versioner.cpp b/tools/versioner/src/versioner.cpp
index bfee6b9..7238a8c 100644
--- a/tools/versioner/src/versioner.cpp
+++ b/tools/versioner/src/versioner.cpp
@@ -485,12 +485,6 @@
}
for (const std::string& symbol_name : completely_unavailable) {
- // This currently has some false positives (mostly functions that come from crtbegin).
- // Therefore, only report these declarations when running with verbose for now.
- if (!verbose) {
- break;
- }
-
bool found_inline_definition = false;
bool future = false;
@@ -515,6 +509,10 @@
continue;
}
+ if (missing_symbol_whitelist.count(symbol_name) != 0) {
+ continue;
+ }
+
printf("%s: not available in any platform\n", symbol_name.c_str());
failed = true;
}
diff --git a/tools/versioner/src/versioner.h b/tools/versioner/src/versioner.h
index 95635bb..ced9b79 100644
--- a/tools/versioner/src/versioner.h
+++ b/tools/versioner/src/versioner.h
@@ -20,6 +20,7 @@
#include <set>
#include <string>
#include <unordered_map>
+#include <unordered_set>
extern bool verbose;
@@ -55,3 +56,8 @@
// time64.h #errors when included on LP64 archs.
{ "time64.h", { "arm64", "mips64", "x86_64" } },
};
+
+static const std::unordered_set<std::string> missing_symbol_whitelist = {
+ // atexit comes from crtbegin.
+ "atexit",
+};