scripts: add MACHO NX check to security-check.py

This commit is contained in:
fanquake
2020-03-25 08:11:20 +08:00
parent 1a4e9f32ef
commit edaca2dd12
2 changed files with 12 additions and 0 deletions

View File

@@ -60,6 +60,8 @@ class TestSecurityChecks(unittest.TestCase):
cc = 'clang'
write_testcode(source)
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace', '-Wl,-allow_stack_execute']),
(1, executable+': failed PIE NOUNDEFS NX'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace']),
(1, executable+': failed PIE NOUNDEFS'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie']),