Skip to content

function multi-versioning: internal linkage resolvers should not use comdat #65114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MaskRay opened this issue Aug 30, 2023 · 1 comment
Closed
Assignees

Comments

@MaskRay
Copy link
Member

MaskRay commented Aug 30, 2023

For function multi-versioning using the target and target_clones
function attributes, currently we incorrectly set comdat for internal
linkage functions. 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.

@MaskRay MaskRay added the clang:codegen IR generation bugs: mangling, exceptions, etc. label Aug 30, 2023
@llvmbot
Copy link
Member

llvmbot commented Aug 30, 2023

@llvm/issue-subscribers-clang-codegen

@MaskRay MaskRay self-assigned this Aug 30, 2023
@EugeneZelenko EugeneZelenko added llvm:codegen and removed clang:codegen IR generation bugs: mangling, exceptions, etc. labels Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants