For function multi-versioning using the target or target_clones
function attributes, currently we incorrectly set comdat for internal
linkage resolvers. This is problematic for ELF linkers
as GRP_COMDAT deduplication will kick in even with STB_LOCAL signature
(https://groups.google.com/g/generic-abi/c/2X6mR-s2zoc
"GRP_COMDAT group with STB_LOCAL signature").
In short, two __attribute((target_clones(...))) static void foo()
in two translation units will be deduplicated. Fix this.
Fix #65114
If I read the code right it applies for function multi-versioning using target_version and target_clones attributes ( AArch64 ) as well, doesn't it?