]> git.puffer.fish Git - mirror/frr.git/commit
lib/xref: work around GCC bug 41091
authorDavid Lamparter <equinox@diac24.net>
Tue, 2 Feb 2021 18:38:38 +0000 (19:38 +0100)
committerDavid Lamparter <equinox@diac24.net>
Tue, 2 Feb 2021 23:55:07 +0000 (00:55 +0100)
commit08a73c422de98eb12a5f3a86112e7a4829eb3fd6
tree4e70d2ce2c2c5ecaae37799acf1b1fafcc7beed9
parent96a70614507b75def9baf590dcac91ed88c268ff
lib/xref: work around GCC bug 41091

gcc fucks up global variables with section attributes when they're used
in templated C++ code.  The template instantiation "magic" kinda breaks
down (it's implemented through COMDAT in the linker, which clashes with
the section attribute.)

The workaround provides full runtime functionality, but the xref
extraction tool (xrelfo.py) won't work on C++ code compiled by GCC.

FWIW, clang gets this right.

Signed-off-by: David Lamparter <equinox@diac24.net>
doc/developer/xrefs.rst
lib/xref.c
lib/xref.h