https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84833
--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #2) > Just a note, as can be seen e.g. on > static volatile int a; > static int my_foo1 (void) { return 1; } > static int my_foo2 (void) { return 2; } > typedef int (*F) (void); > static F resolve_foo (void) { if (a) return my_foo1; else return my_foo2; } > static int foo (void) __attribute__ ((ifunc ("resolve_foo"))); > > int > main () > { > if (foo () != 2) > __builtin_abort (); > } > there is no reason why any of the target clones, resolver or the ifunc > function should be .globl, they can all be local to the TU, IFUNC work just > fine that way too. So, if the function with target_clones attribute is not > TREE_PUBLIC, neither should be any of the multiple_targets.c created symbols. If I see correctly, we do not make these global: nm pr84833-2.o 0000000000000000 b a U abort 000000000000000c i foo 0000000000000022 T main 0000000000000000 t my_foo1 0000000000000006 t my_foo2 000000000000000c t resolve_foo Note that it was subject of PR81213.