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:
Unfortunately this patch is not trivial to backport, that's why I am opening this bug.
Created attachment 21550 [details]
Fixed in 4.5+, 4.4 is no longer supported.