Skip to content

Commit 7c9e821

Browse files
committed
scripts: add MACHO NOUNDEFS check to security-check.py
1 parent 4ca92dc commit 7c9e821

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

contrib/devtools/security-check.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,15 @@ def check_MACHO_PIE(executable) -> bool:
188188
return True
189189
return False
190190

191+
def check_MACHO_NOUNDEFS(executable) -> bool:
192+
'''
193+
Check for no undefined references.
194+
'''
195+
flags = get_MACHO_executable_flags(executable)
196+
if 'NOUNDEFS' in flags:
197+
return True
198+
return False
199+
191200
CHECKS = {
192201
'ELF': [
193202
('PIE', check_ELF_PIE),
@@ -202,6 +211,7 @@ def check_MACHO_PIE(executable) -> bool:
202211
],
203212
'MACHO': [
204213
('PIE', check_MACHO_PIE),
214+
('NOUNDEFS', check_MACHO_NOUNDEFS),
205215
]
206216
}
207217

0 commit comments

Comments
 (0)