@@ -58,32 +58,32 @@ def test_ELF(self):
5858 arch = get_arch (cc , source , executable )
5959
6060 if arch == lief .ARCHITECTURES .X86 :
61- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-zexecstack' ,'-fno-stack-protector' ,'-Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
62- (1 , executable + ': failed PIE NX RELRO Canary CONTROL_FLOW' ))
63- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fno-stack-protector' ,'-Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
64- (1 , executable + ': failed PIE RELRO Canary CONTROL_FLOW' ))
65- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fstack-protector-all' ,'-Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
61+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-zexecstack' ,'-Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
62+ (1 , executable + ': failed PIE NX RELRO CONTROL_FLOW' ))
63+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
6664 (1 , executable + ': failed PIE RELRO CONTROL_FLOW' ))
67- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fstack-protector-all' ,'-Wl,-znorelro' ,'-pie' ,'-fPIE' , '-Wl,-z,separate-code' ]),
65+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
66+ (1 , executable + ': failed PIE RELRO CONTROL_FLOW' ))
67+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-znorelro' ,'-pie' ,'-fPIE' , '-Wl,-z,separate-code' ]),
6868 (1 , executable + ': failed RELRO CONTROL_FLOW' ))
69- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fstack-protector-all' , '- Wl,-zrelro' ,'-Wl,-z,now' ,'-pie' ,'-fPIE' , '-Wl,-z,noseparate-code' ]),
69+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-zrelro' ,'-Wl,-z,now' ,'-pie' ,'-fPIE' , '-Wl,-z,noseparate-code' ]),
7070 (1 , executable + ': failed separate_code CONTROL_FLOW' ))
71- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fstack-protector-all' , '- Wl,-zrelro' ,'-Wl,-z,now' ,'-pie' ,'-fPIE' , '-Wl,-z,separate-code' ]),
71+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-zrelro' ,'-Wl,-z,now' ,'-pie' ,'-fPIE' , '-Wl,-z,separate-code' ]),
7272 (1 , executable + ': failed CONTROL_FLOW' ))
73- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fstack-protector-all' , '- Wl,-zrelro' ,'-Wl,-z,now' ,'-pie' ,'-fPIE' , '-Wl,-z,separate-code' , '-fcf-protection=full' ]),
73+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-zrelro' ,'-Wl,-z,now' ,'-pie' ,'-fPIE' , '-Wl,-z,separate-code' , '-fcf-protection=full' ]),
7474 (0 , '' ))
7575 else :
76- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-zexecstack' ,'-fno-stack-protector' , '- Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
77- (1 , executable + ': failed PIE NX RELRO Canary ' ))
78- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fno-stack-protector' , '- Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
79- (1 , executable + ': failed PIE RELRO Canary ' ))
80- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fstack-protector-all' , '- Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
76+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-zexecstack' ,'-Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
77+ (1 , executable + ': failed PIE NX RELRO' ))
78+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
79+ (1 , executable + ': failed PIE RELRO' ))
80+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
8181 (1 , executable + ': failed PIE RELRO' ))
82- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fstack-protector-all' , '- Wl,-znorelro' ,'-pie' ,'-fPIE' , '-Wl,-z,separate-code' ]),
82+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-znorelro' ,'-pie' ,'-fPIE' , '-Wl,-z,separate-code' ]),
8383 (1 , executable + ': failed RELRO' ))
84- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fstack-protector-all' , '- Wl,-zrelro' ,'-Wl,-z,now' ,'-pie' ,'-fPIE' , '-Wl,-z,noseparate-code' ]),
84+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-zrelro' ,'-Wl,-z,now' ,'-pie' ,'-fPIE' , '-Wl,-z,noseparate-code' ]),
8585 (1 , executable + ': failed separate_code' ))
86- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fstack-protector-all' , '- Wl,-zrelro' ,'-Wl,-z,now' ,'-pie' ,'-fPIE' , '-Wl,-z,separate-code' ]),
86+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-zrelro' ,'-Wl,-z,now' ,'-pie' ,'-fPIE' , '-Wl,-z,separate-code' ]),
8787 (0 , '' ))
8888
8989 clean_files (source , executable )
0 commit comments