https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109712
--- Comment #14 from Thomas Neumann <tneumann at users dot sourceforge.net> --- I cannot reproduce the problem, but admittedly I used a newer Ubuntu version. I tried compiling it with gcc 7.5.0, linking it with gold 1.16, and using the gcc version you specified (07c52d1eec9) for the shared library without problems. Can you attach the a.out that you generate? This will hopefully allow me to reproduce the problem.