In some conditions on mips/mipsel, when compiling with -g, ld fails to link the resulting objects (see attached testcase):
| gcc -O2 -g -fPIC -shared -o libb.so yb.c | gcc -O2 -g -o ya.o -c ya.c | gcc -O2 -g -o y ya.o -L. -lb | /usr/bin/ld: non-dynamic relocations refer to dynamic symbol xxprogname | /usr/bin/ld: failed to set dynamic section sizes: Bad value | collect2: ld returned 1 exit status This bug is a regression from the gcc 4.3 branch, and is already fixed in the 4.5 branch by the following patch: | http://gcc.gnu.org/ml/gcc-patches/2009-09/msg02070.html Unfortunately this patch is not trivial to backport, that's why I am opening this bug. -- Summary: mips: non-dynamic relocations refer to dynamc symbol Product: gcc Version: 4.4.4 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: aurelien at aurel32 dot net GCC build triplet: mips-linux-gnu GCC host triplet: mips-linux-gnu GCC target triplet: mips-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45387