[Bug target/93274] target_clones produces symbols with random digits with -fPIC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93274 --- Comment #8 from CVS Commits --- The master branch has been updated by Martin Liska : https://gcc.gnu.org/g:724ec02c2c6d1b79788be77f68ebb6ca7b5b6acd commit r10-7372-g724ec02c2c6d1b79788be77f68ebb6ca7b5b6acd Author: Martin Liska Date: Wed Mar 25 11:03:39 2020 +0100 Make target_clones resolver fn static if possible. PR target/93274 PR ipa/94271 * config/i386/i386-features.c (make_resolver_func): Drop public flag for resolver. * config/rs6000/rs6000.c (make_resolver_func): Add comdat group for resolver and drop public flag if possible. * multiple_target.c (create_dispatcher_calls): Drop unique_name and resolution as we want to enable LTO privatization of the default symbol. PR target/93274 PR ipa/94271 * gcc.target/i386/pr81213-2.c: New test. * gcc.target/i386/pr81213.c: Add additional source. * gcc.dg/lto/pr94271_0.c: New test. * gcc.dg/lto/pr94271_1.c: New test.
[Bug target/93274] target_clones produces symbols with random digits with -fPIC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93274 Martin Liška changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #7 from Martin Liška --- Fixed on trunk, probably not planning to backport.
[Bug target/93274] target_clones produces symbols with random digits with -fPIC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93274 --- Comment #6 from CVS Commits --- The master branch has been updated by Martin Liska : https://gcc.gnu.org/g:c2bd2b4664be8b73f8fd58a64dec1e93871797cc commit r10-6242-gc2bd2b4664be8b73f8fd58a64dec1e93871797cc Author: Martin Liska Date: Mon Jan 27 10:48:18 2020 +0100 Do not generate a unique fnname for resolver. PR target/93274 * config/i386/i386-features.c (make_resolver_func): Align the code with ppc64 target implementation. Do not generate a unique name for resolver function. PR target/93274 * gcc.target/i386/pr81213.c: Adjust to not expect a globally unique name.
[Bug target/93274] target_clones produces symbols with random digits with -fPIC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93274 Martin Liška changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org --- Comment #5 from Martin Liška --- (In reply to Alexander Monakov from comment #4) > IFUNCs don't have to be somehow "globally visible". The comment is there > from day 1, but it's not clear why - possibly a misunderstanding? GCC > happily accepts a static ifunc, and rest of toolchain should have no problem > either: > > __attribute__((used,ifunc("r_f"))) > static void f(); > > static void *r_f() > { > return 0; > } > .type r_f, @function > r_f: > xorl%eax, %eax > ret > .size r_f, .-r_f > .type f, @gnu_indirect_function > .setf,r_f Great Alexander. Then let me to test the suggested change.
[Bug target/93274] target_clones produces symbols with random digits with -fPIC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93274 Alexander Monakov changed: What|Removed |Added CC||amonakov at gcc dot gnu.org --- Comment #4 from Alexander Monakov --- IFUNCs don't have to be somehow "globally visible". The comment is there from day 1, but it's not clear why - possibly a misunderstanding? GCC happily accepts a static ifunc, and rest of toolchain should have no problem either: __attribute__((used,ifunc("r_f"))) static void f(); static void *r_f() { return 0; } .type r_f, @function r_f: xorl%eax, %eax ret .size r_f, .-r_f .type f, @gnu_indirect_function .setf,r_f
[Bug target/93274] target_clones produces symbols with random digits with -fPIC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93274 Bernhard M. Wiedemann changed: What|Removed |Added CC||gccbmw at lsmod dot de --- Comment #3 from Bernhard M. Wiedemann --- The usual way to get deterministic uniqueness is to hash over all relevant inputs
[Bug target/93274] target_clones produces symbols with random digits with -fPIC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93274 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2020-01-15 Ever confirmed|0 |1 --- Comment #2 from Martin Liška --- Yes, it's caused by the needed public visibility.
[Bug target/93274] target_clones produces symbols with random digits with -fPIC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93274 --- Comment #1 from Richard Biener --- Probably caused by /* IFUNC's have to be globally visible. So, if the default_decl is not, then the name of the IFUNC should be made unique. */ if (TREE_PUBLIC (default_decl) == 0) { char *ifunc_name = make_unique_name (default_decl, "ifunc", true); symtab->change_decl_assembler_name (ifunc_alias_decl, get_identifier (ifunc_name)); not sure if easy to avoid.