https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64163
--- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- With the unreduced testcase this issue also happens on x86_64 with gold: markus@x4 /tmp % g++ -w -shared -fPIC -O2 -fvisibility=hidden -std=c++0x qmimeglobpattern.ii qmimeprovider.ii markus@x4 /tmp % g++ -w -shared -fPIC -O3 -fvisibility=hidden -std=c++0x qmimeglobpattern.ii qmimeprovider.ii /usr/bin/ld: error: /tmp/ccpdsACp.o: requires dynamic R_X86_64_PC32 reloc against '_ZN5QListI7QStringED1Ev' which may overflow at runtime; recompile with -fPIC /tmp/ccpdsACp.o:qmimeprovider.cpp:function QMimeXMLProvider::ensureLoaded(): warning: relocation refers to discarded section /tmp/ccpdsACp.o:qmimeprovider.cpp:function QMimeXMLProvider::listAliases(QString const&): warning: relocation refers to discarded section /tmp/ccpdsACp.o:qmimeprovider.cpp:function QMimeXMLProvider::listAliases(QString const&): warning: relocation refers to discarded section /tmp/ccpdsACp.o:qmimeprovider.cpp:function QMimeBinaryProvider::checkCache(): warning: relocation refers to discarded section /tmp/ccpdsACp.o:qmimeprovider.cpp:function QMimeBinaryProvider::loadMimeTypePrivate(QMimeTypePrivate&): warning: relocation refers to discarded section /tmp/ccpdsACp.o:qmimeprovider.cpp:function QMimeBinaryProvider::loadMimeTypePrivate(QMimeTypePrivate&): warning: relocation refers to discarded section /tmp/ccpdsACp.o:qmimeprovider.cpp:function QMimeBinaryProvider::loadMimeTypePrivate(QMimeTypePrivate&): warning: relocation refers to discarded section collect2: error: ld returned 1 exit status (ld.bfd is fine:) markus@x4 /tmp % g++ -w -shared -fPIC -O3 -fvisibility=hidden -std=c++0x qmimeglobpattern.ii qmimeprovider.ii markus@x4 /tmp %