From 31a31c9dc19b0a20a69c282b8760147bf79e37a6 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Fri, 3 Feb 2017 16:15:51 +0100 Subject: [PATCH] Bail out binds_to_current_def_p for ifunc functions. 2017-02-03 Martin Liska * symtab.c (symtab_node::binds_to_current_def_p): Bail out in case of a function with ifunc attribute. From-SVN: r245154 --- gcc/ChangeLog | 5 +++++ gcc/symtab.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 067723cacdf..384dd373434 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-02-03 Martin Liska + + * symtab.c (symtab_node::binds_to_current_def_p): Bail out + in case of a function with ifunc attribute. + 2017-02-03 Martin Liska * cgraph.c (cgraph_node::dump): Dump function version info. diff --git a/gcc/symtab.c b/gcc/symtab.c index 0078896c8a8..f0baf081040 100644 --- a/gcc/symtab.c +++ b/gcc/symtab.c @@ -2225,6 +2225,8 @@ symtab_node::binds_to_current_def_p (symtab_node *ref) if (transparent_alias) return definition && get_alias_target()->binds_to_current_def_p (ref); + if (lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl))) + return false; if (decl_binds_to_current_def_p (decl)) return true; -- 2.30.2