On Jul 20, 2023, Richard Biener <richard.guent...@gmail.com> wrote: > I wonder if we could have shared some of the cgraph/varasm bits > with the symver attribute handling? It's just a new 'sym' but > without the version part?
Possibly. process_common_attributes could be a good place to create the alias decl, like symver does. But that wouldn't cover clones of C++ ctors and dtors, that get variants of the named sym, nor sym attributes attached to C++ classes. Aside from these special cases, it is an alias declaration, without much else to do, which is not very much unlike symver, but the named sym alias needs to be introduced in the symtab early enough that other (non-sym) alias declarations can refer to it, which symver doesn't need to worry about. -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about <https://stallmansupport.org>