https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61886

--- Comment #35 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Zack,
happy to hear from you again! Indeed the problem back was quite sloppy and we
kind of mixed up symbols, assembler names and declarations in not well defined
way.

I think the safest way to go is to build on the alias machinery.  For weakref
we already have sense of "syntactic alias" (those that ends up translated to
their target symbols) and I did some auditing recently (motivated by ICF bugs).
Currently we have  node->weakref saying if symbol is weakref and we do have
good part of code aware of this.  I guess we can have node->syntactic_alias
(better name welcome, perhaps transparent?) that express the fact that alias
should get translated to the final symbol during RTL output the same way as we
do weakref on targets where they are not supported.
Then it is a question where we want to translate the duplicated declarations
into these aliases.  I guess I can do it within the visibility itself or the
FEs can be responsible for it.

We can also get more fancy and try to solve the GNU extern inline issues - have
a syntactic alias with also has boddy associated with it.

I will try to start pushing things this direction.

Reply via email to