aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2019-12-31 23:58:13 +0300
committerfanquake <fanquake@gmail.com>2020-01-02 14:42:23 +0800
commit7c9e821c4e6cb186208ead9c8df616d1f393a49a (patch)
tree9b628192d148107c21d6e51ff3c088f0d9231369
parent4ca92dc6d3f3e487d63286d8871d1829b3d279ff (diff)
scripts: add MACHO NOUNDEFS check to security-check.py
-rwxr-xr-xcontrib/devtools/security-check.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/devtools/security-check.py b/contrib/devtools/security-check.py
index 7a2b925850..9941c57479 100755
--- a/contrib/devtools/security-check.py
+++ b/contrib/devtools/security-check.py
@@ -188,6 +188,15 @@ def check_MACHO_PIE(executable) -> bool:
return True
return False
+def check_MACHO_NOUNDEFS(executable) -> bool:
+ '''
+ Check for no undefined references.
+ '''
+ flags = get_MACHO_executable_flags(executable)
+ if 'NOUNDEFS' in flags:
+ return True
+ return False
+
CHECKS = {
'ELF': [
('PIE', check_ELF_PIE),
@@ -202,6 +211,7 @@ CHECKS = {
],
'MACHO': [
('PIE', check_MACHO_PIE),
+ ('NOUNDEFS', check_MACHO_NOUNDEFS),
]
}