mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-19 16:42:33 +00:00
[stack-canaries] added protection modes
This commit is contained in:
@@ -160,6 +160,16 @@ gb_internal lbProcedure *lb_create_procedure(lbModule *m, Entity *entity, bool i
|
||||
lb_add_attribute_to_proc(m, p->value, "nonlazybind");
|
||||
}
|
||||
|
||||
switch (build_context.stack_protector) {
|
||||
case StackProtector_Default:
|
||||
case StackProtector_Ssp:
|
||||
lb_add_attribute_to_proc(m, p->value, "ssp");
|
||||
case StackProtector_SspReq:
|
||||
lb_add_attribute_to_proc(m, p->value, "sspreq");
|
||||
case StackProtector_SspStrong:
|
||||
lb_add_attribute_to_proc(m, p->value, "sspstrong");
|
||||
}
|
||||
|
||||
if (build_context.disable_unwind) {
|
||||
lb_add_attribute_to_proc(m, p->value, "nounwind");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user