[Bug c++/94342] GCC ignores attribute((section(...))) for static variables inside templates

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Mar 27 11:06:05 GMT 2020


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
COMDAT is implemented in different ways.  If it is through the ELF comdat
groups, then in theory this can be handled, by putting the COMDAT variable
(from template instantiation, or inline variable, static var in inline function
etc.) into the section with the given name and use the comdat group we would
normally use.
If ELF comdat groups aren't supported, then we use .gnu.linkonce.* sections and
in that case it can't be really supported.  Nor in the non-ELF cases...


More information about the Gcc-bugs mailing list