--- gcc/targhooks.c 2017-02-07 12:29:06.644837000 +0100 +++ gcc/targhooks.c 2017-10-29 17:08:58.318032821 +0100 @@ -856,8 +856,8 @@ if (t == NULL_TREE) { t = build_function_type_list (void_type_node, NULL_TREE); - t = build_decl (UNKNOWN_LOCATION, FUNCTION_DECL, - get_identifier ("__stack_chk_fail_local"), t); + t = build_decl (UNKNOWN_LOCATION, + FUNCTION_DECL, get_identifier ("__stack_chk_fail"), t); TREE_STATIC (t) = 1; TREE_PUBLIC (t) = 1; DECL_EXTERNAL (t) = 1; @@ -866,8 +866,8 @@ TREE_NOTHROW (t) = 1; DECL_ARTIFICIAL (t) = 1; DECL_IGNORED_P (t) = 1; + DECL_VISIBILITY (t) = VISIBILITY_DEFAULT; DECL_VISIBILITY_SPECIFIED (t) = 1; - DECL_VISIBILITY (t) = VISIBILITY_HIDDEN; stack_chk_fail_decl = t; }