https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83908
Bug ID: 83908 Summary: -fvisibility=hidden not setting the visibility of the resolver/ifunc created for attribute target Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rafael.espindola at gmail dot com Target Milestone: --- Given the c++ code int __attribute__((target("sse4.2"))) foo_overload(int); int __attribute__((target("default"))) foo_overload(int); int bar() { return foo_overload(1); } gcc produces 10: 0000000000000000 32 FUNC WEAK DEFAULT 6 _Z12foo_overloadi.resolver 11: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __cpu_indicator_init 12: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __cpu_model 13: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _Z12foo_overloadi.sse4.2 14: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _Z12foo_overloadi 15: 0000000000000000 32 IFUNC GLOBAL DEFAULT 6 _Z23_Z12foo_overloadi.ifunci 16: 0000000000000000 10 FUNC GLOBAL HIDDEN 2 _Z3barv Note how only _Z3barv is hidden.