Skip to content
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

clang: support __attribute__((__symver__("..."))) #59438

Open
bnoordhuis opened this issue Dec 11, 2022 · 1 comment
Open

clang: support __attribute__((__symver__("..."))) #59438

bnoordhuis opened this issue Dec 11, 2022 · 1 comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema"

Comments

@bnoordhuis
Copy link

clang does not seem to support gcc's __symver__ attribute (also spelled symver). It would be nice if it did.

gcc documentation: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes (sorry, I can't seem to link to a specific entry - it's about 4/5th down)

My workaround looks like this:

#ifdef __clang__
__asm__(".symver foo,foo@@V1.2.3");
#else
__attribute__((__symver__("foo@@V1.2.3")))
#endif
void foo(void) {}

Other people/projects seem to hit this as well, ex. https://github.com/OpenMandrivaAssociation/kernel-rc/blob/087b62e4c6c036c4cf79558891b6851a67b2f684/linux-5.16-clang-no-attribute-symver.patch

@EugeneZelenko EugeneZelenko added clang:frontend Language frontend issues, e.g. anything involving "Sema" and removed new issue labels Dec 11, 2022
@llvmbot
Copy link
Member

llvmbot commented Dec 11, 2022

@llvm/issue-subscribers-clang-frontend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema"
Projects
None yet
Development

No branches or pull requests

3 participants