The ELF spec says:
GRP_COMDAT: This is a COMDAT group. It may duplicate another COMDAT group in another object file, where duplication is defined as having the same group signature.
The wording "having the same group signature" is not clear. GNU ld/gold/LLD
simply use the symbol name as the deduplication key. Another interpretation is
that we should respect the regular symbol resolution rule and treat a STB_LOCAL
signature different from another object file with the same name.
I think the STB_LOCAL interpretation aligns with the ELF spirit.
Compilers don't produce local signature symbols. However, a local signature
symbol may be created by
objcopy --localize-hidden/--keep-global-symbol or IR internalization (if we
apply D53234). I feel that it is useful to suppress GRP_COMDAT deduplication
when the signature symbol is STB_LOCAL.