diff options
author | fanquake <fanquake@gmail.com> | 2019-12-31 23:58:13 +0300 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2020-01-02 14:42:23 +0800 |
commit | 7c9e821c4e6cb186208ead9c8df616d1f393a49a (patch) | |
tree | 9b628192d148107c21d6e51ff3c088f0d9231369 /contrib/devtools | |
parent | 4ca92dc6d3f3e487d63286d8871d1829b3d279ff (diff) |
scripts: add MACHO NOUNDEFS check to security-check.py
Diffstat (limited to 'contrib/devtools')
-rwxr-xr-x | contrib/devtools/security-check.py | 10 |
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), ] } |