Skip to content

Commit 8334ee3

Browse files
committed
scripts: add MACHO LAZY_BINDINGS test to test-security-check.py
I didn't add the relevant test in #18295.
1 parent 7b99c74 commit 8334ee3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

contrib/devtools/test-security-check.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,16 @@ def test_MACHO(self):
6565
write_testcode(source)
6666

6767
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fno-stack-protector']),
68-
(1, executable+': failed PIE NOUNDEFS NX Canary'))
68+
(1, executable+': failed PIE NOUNDEFS NX LAZY_BINDINGS Canary'))
6969
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fstack-protector-all']),
70-
(1, executable+': failed PIE NOUNDEFS NX'))
70+
(1, executable+': failed PIE NOUNDEFS NX LAZY_BINDINGS'))
7171
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-fstack-protector-all']),
72-
(1, executable+': failed PIE NOUNDEFS'))
72+
(1, executable+': failed PIE NOUNDEFS LAZY_BINDINGS'))
7373
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all']),
74+
(1, executable+': failed PIE LAZY_BINDINGS'))
75+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-bind_at_load','-fstack-protector-all']),
7476
(1, executable+': failed PIE'))
75-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-pie','-fstack-protector-all']),
77+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-pie','-Wl,-bind_at_load','-fstack-protector-all']),
7678
(0, ''))
7779

7880
if __name__ == '__main__':

0 commit comments

Comments
 (0)