diff options
author | Kees Cook <keescook@chromium.org> | 2017-01-13 17:09:35 -0500 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-01-13 17:20:03 -0500 |
commit | 5a45a4c5c3f5e36a03770deb102ca6ba256ff3d7 (patch) | |
tree | 0764f01c69440d5499223737496bbdecf05e3ca9 /scripts/gcc-plugins/latent_entropy_plugin.c | |
parent | 8d4973a1c01d4b38871fbc6631e1fdd20e6c9e90 (diff) |
gcc-plugins: consolidate on PASS_INFO macro
Now that PASS_INFO() exists, use it in the other existing gcc plugins,
instead of always open coding the same thing.
Based on updates to the grsecurity/PaX gcc plugins.
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'scripts/gcc-plugins/latent_entropy_plugin.c')
-rw-r--r-- | scripts/gcc-plugins/latent_entropy_plugin.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/scripts/gcc-plugins/latent_entropy_plugin.c b/scripts/gcc-plugins/latent_entropy_plugin.c index 8ff203ad4809..65264960910d 100644 --- a/scripts/gcc-plugins/latent_entropy_plugin.c +++ b/scripts/gcc-plugins/latent_entropy_plugin.c | |||
@@ -592,12 +592,6 @@ __visible int plugin_init(struct plugin_name_args *plugin_info, | |||
592 | const struct plugin_argument * const argv = plugin_info->argv; | 592 | const struct plugin_argument * const argv = plugin_info->argv; |
593 | int i; | 593 | int i; |
594 | 594 | ||
595 | struct register_pass_info latent_entropy_pass_info; | ||
596 | |||
597 | latent_entropy_pass_info.pass = make_latent_entropy_pass(); | ||
598 | latent_entropy_pass_info.reference_pass_name = "optimized"; | ||
599 | latent_entropy_pass_info.ref_pass_instance_number = 1; | ||
600 | latent_entropy_pass_info.pos_op = PASS_POS_INSERT_BEFORE; | ||
601 | static const struct ggc_root_tab gt_ggc_r_gt_latent_entropy[] = { | 595 | static const struct ggc_root_tab gt_ggc_r_gt_latent_entropy[] = { |
602 | { | 596 | { |
603 | .base = &latent_entropy_decl, | 597 | .base = &latent_entropy_decl, |
@@ -609,6 +603,8 @@ __visible int plugin_init(struct plugin_name_args *plugin_info, | |||
609 | LAST_GGC_ROOT_TAB | 603 | LAST_GGC_ROOT_TAB |
610 | }; | 604 | }; |
611 | 605 | ||
606 | PASS_INFO(latent_entropy, "optimized", 1, PASS_POS_INSERT_BEFORE); | ||
607 | |||
612 | if (!plugin_default_version_check(version, &gcc_version)) { | 608 | if (!plugin_default_version_check(version, &gcc_version)) { |
613 | error(G_("incompatible gcc/plugin versions")); | 609 | error(G_("incompatible gcc/plugin versions")); |
614 | return 1; | 610 | return 1; |