@@ -59,32 +59,32 @@ def test_ELF(self):
5959 arch = get_arch (cc , source , executable )
6060
6161 if arch == lief .ARCHITECTURES .X86 :
62- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-zexecstack' ,'-fno-stack-protector' ,'-Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
63- (1 , executable + ': failed PIE NX RELRO Canary CONTROL_FLOW' ))
64- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fno-stack-protector' ,'-Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
65- (1 , executable + ': failed PIE RELRO Canary CONTROL_FLOW' ))
66- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fstack-protector-all' ,'-Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
62+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-zexecstack' ,'-Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
63+ (1 , executable + ': failed PIE NX RELRO CONTROL_FLOW' ))
64+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
6765 (1 , executable + ': failed PIE RELRO CONTROL_FLOW' ))
68- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fstack-protector-all' ,'-Wl,-znorelro' ,'-pie' ,'-fPIE' , '-Wl,-z,separate-code' ]),
66+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
67+ (1 , executable + ': failed PIE RELRO CONTROL_FLOW' ))
68+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-znorelro' ,'-pie' ,'-fPIE' , '-Wl,-z,separate-code' ]),
6969 (1 , executable + ': failed RELRO CONTROL_FLOW' ))
70- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fstack-protector-all' , '- Wl,-zrelro' ,'-Wl,-z,now' ,'-pie' ,'-fPIE' , '-Wl,-z,noseparate-code' ]),
70+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-zrelro' ,'-Wl,-z,now' ,'-pie' ,'-fPIE' , '-Wl,-z,noseparate-code' ]),
7171 (1 , executable + ': failed separate_code CONTROL_FLOW' ))
72- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fstack-protector-all' , '- Wl,-zrelro' ,'-Wl,-z,now' ,'-pie' ,'-fPIE' , '-Wl,-z,separate-code' ]),
72+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-zrelro' ,'-Wl,-z,now' ,'-pie' ,'-fPIE' , '-Wl,-z,separate-code' ]),
7373 (1 , executable + ': failed CONTROL_FLOW' ))
74- 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' ]),
74+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-zrelro' ,'-Wl,-z,now' ,'-pie' ,'-fPIE' , '-Wl,-z,separate-code' , '-fcf-protection=full' ]),
7575 (0 , '' ))
7676 else :
77- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-zexecstack' ,'-fno-stack-protector' , '- Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
78- (1 , executable + ': failed PIE NX RELRO Canary ' ))
79- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fno-stack-protector' , '- Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
80- (1 , executable + ': failed PIE RELRO Canary ' ))
81- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fstack-protector-all' , '- Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
77+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-zexecstack' ,'-Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
78+ (1 , executable + ': failed PIE NX RELRO' ))
79+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
80+ (1 , executable + ': failed PIE RELRO' ))
81+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-znorelro' ,'-no-pie' ,'-fno-PIE' , '-Wl,-z,separate-code' ]),
8282 (1 , executable + ': failed PIE RELRO' ))
83- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fstack-protector-all' , '- Wl,-znorelro' ,'-pie' ,'-fPIE' , '-Wl,-z,separate-code' ]),
83+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-znorelro' ,'-pie' ,'-fPIE' , '-Wl,-z,separate-code' ]),
8484 (1 , executable + ': failed RELRO' ))
85- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fstack-protector-all' , '- Wl,-zrelro' ,'-Wl,-z,now' ,'-pie' ,'-fPIE' , '-Wl,-z,noseparate-code' ]),
85+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-zrelro' ,'-Wl,-z,now' ,'-pie' ,'-fPIE' , '-Wl,-z,noseparate-code' ]),
8686 (1 , executable + ': failed separate_code' ))
87- self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-fstack-protector-all' , '- Wl,-zrelro' ,'-Wl,-z,now' ,'-pie' ,'-fPIE' , '-Wl,-z,separate-code' ]),
87+ self .assertEqual (call_security_check (cc , source , executable , ['-Wl,-znoexecstack' ,'-Wl,-zrelro' ,'-Wl,-z,now' ,'-pie' ,'-fPIE' , '-Wl,-z,separate-code' ]),
8888 (0 , '' ))
8989
9090 clean_files (source , executable )
0 commit comments