From: Martin Liska Date: Mon, 27 Apr 2020 04:44:29 +0000 (+0200) Subject: Do not remove ifunc_resolver in LTO. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b9dbb436b70938ca2b1ddf0cf2d5ffe2e5725dea;p=gcc.git Do not remove ifunc_resolver in LTO. PR lto/94659 * cgraph.h (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Do not remove ifunc_resolvers in remove unreachable nodes in LTO. --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 36b5720756a..54cc55c5e8d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2020-04-27 Martin Liska + + PR lto/94659 + * cgraph.h (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): + Do not remove ifunc_resolvers in remove unreachable nodes in LTO. + 2020-04-27 Xiong Hu Luo PR target/91518 diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 43de3b4a8ac..5ddeb65269b 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -3162,7 +3162,7 @@ cgraph_node::can_remove_if_no_direct_calls_and_refs_p (void) return false; /* Only COMDAT functions can be removed if externally visible. */ if (externally_visible - && (!DECL_COMDAT (decl) + && ((!DECL_COMDAT (decl) || ifunc_resolver) || forced_by_abi || used_from_object_file_p ())) return false;