From 8334ee31f868f0f9baf0920d14d20174ed889dbe Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 21 Apr 2020 09:55:12 +0800 Subject: scripts: add MACHO LAZY_BINDINGS test to test-security-check.py I didn't add the relevant test in #18295. --- contrib/devtools/test-security-check.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'contrib/devtools/test-security-check.py') diff --git a/contrib/devtools/test-security-check.py b/contrib/devtools/test-security-check.py index a0b2f86ee2..d09f1d0064 100755 --- a/contrib/devtools/test-security-check.py +++ b/contrib/devtools/test-security-check.py @@ -65,14 +65,16 @@ class TestSecurityChecks(unittest.TestCase): write_testcode(source) self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fno-stack-protector']), - (1, executable+': failed PIE NOUNDEFS NX Canary')) + (1, executable+': failed PIE NOUNDEFS NX LAZY_BINDINGS Canary')) self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fstack-protector-all']), - (1, executable+': failed PIE NOUNDEFS NX')) + (1, executable+': failed PIE NOUNDEFS NX LAZY_BINDINGS')) self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-fstack-protector-all']), - (1, executable+': failed PIE NOUNDEFS')) + (1, executable+': failed PIE NOUNDEFS LAZY_BINDINGS')) self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all']), + (1, executable+': failed PIE LAZY_BINDINGS')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-bind_at_load','-fstack-protector-all']), (1, executable+': failed PIE')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-pie','-fstack-protector-all']), + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-pie','-Wl,-bind_at_load','-fstack-protector-all']), (0, '')) if __name__ == '__main__': -- cgit v1.2.3