diff options
author | 2003-10-07 01:24:33 +0000 | |
---|---|---|
committer | 2003-10-07 01:24:33 +0000 | |
commit | 79343fb4008cbcc9c7bf36d4831eb411b39fa8d9 (patch) | |
tree | ade136ae042f523765917c123f6c7559c65e8248 | |
parent | flag_stack_protection enables to genereate protecting instruments for every functions. (diff) | |
download | wireguard-openbsd-79343fb4008cbcc9c7bf36d4831eb411b39fa8d9.tar.xz wireguard-openbsd-79343fb4008cbcc9c7bf36d4831eb411b39fa8d9.zip |
toplev.c, flags.h: add -fstack-protector-all option to generate protection instruments for every functions.
ok pvalchev@
-rw-r--r-- | gnu/egcs/gcc/flags.h | 1 | ||||
-rw-r--r-- | gnu/egcs/gcc/toplev.c | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/gnu/egcs/gcc/flags.h b/gnu/egcs/gcc/flags.h index 24ef2a1a80c..bc1c5690f3d 100644 --- a/gnu/egcs/gcc/flags.h +++ b/gnu/egcs/gcc/flags.h @@ -542,6 +542,7 @@ extern int flag_no_ident; /* Nonzero means use propolice as a stack protection method */ extern int flag_propolice_protection; +extern int flag_stack_protection; /* Warn when not issuing stack smashing protection for some reason */ diff --git a/gnu/egcs/gcc/toplev.c b/gnu/egcs/gcc/toplev.c index 6d50bd7b6e9..bbe46849d94 100644 --- a/gnu/egcs/gcc/toplev.c +++ b/gnu/egcs/gcc/toplev.c @@ -779,8 +779,10 @@ int flag_no_ident = 0; #if defined(STACK_PROTECTOR) && defined(STACK_GROWS_DOWNWARD) /* Nonzero means use propolice as a stack protection method */ int flag_propolice_protection = 1; +int flag_stack_protection = 0; #else int flag_propolice_protection = 0; +int flag_stack_protection = 0; #endif /* Table of supported debugging formats. */ @@ -993,8 +995,8 @@ lang_independent_options f_options[] = "Process #ident directives"}, {"stack-protector", &flag_propolice_protection, 1, "Enables stack protection" }, - {"no-stack-protector", &flag_propolice_protection, 0, - "Disables stack protection" }, + {"stack-protector-all", &flag_stack_protection, 1, + "Enables stack protection of every function" }, }; #define NUM_ELEM(a) (sizeof (a) / sizeof ((a)[0])) @@ -3669,6 +3671,7 @@ rest_of_compilation (decl) insns = get_insns (); + flag_propolice_protection |= flag_stack_protection; if (flag_propolice_protection) prepare_stack_protection (inlinable); /* Dump the rtl code if we are dumping rtl. */ |