I have a stripped down simple program with a static variable (\'abc.cpp\'):
#include
int main(int, char**)
{
static const std::string a(\
The issue is actually a bug in the gold linker your system is probably using by default. Check the name printed by ld --version. The bug appears to still be open: https://sourceware.org/bugzilla/show_bug.cgi?id=16417
Using the standard bfd linker does not show this problem. The linker used is either defined by gcc -fuse-ld=gold
or the symlink in /usr/bin/ld