[uClibc] problem linking statically

Paul van Gool paul.vangool at rinconnetworks.com
Fri Oct 3 21:56:25 UTC 2003


Hi,

I just ran into a problem statically linked an app. I'm using uClibc
0.9.21, gcc 3.3.1 on an SH4 platform. A sample prog that reproduces it is:

#include <dlfcn.h>

int main(void)
{
    void* ptr;
    ptr = dlopen("bla", RTLD_NOW);
    return 0;
}

During linking I get:

[vangool at sb-lnx3 gcctest]$ sh-uclibc-gcc dlopen.c -o dlopen -static -ldl
/usr/local/toolchain/sh-uclibc/lib/gcc-lib/sh-linux/3.3.1/../../../../sh-linux/lib/libdl.a(dlib.o)(.text+0x17e0):
In function `_dlopen':
: undefined reference to `_dl_fixup'
collect2: ld returned 1 exit status

The same things happens with the i386 toolchain btw. The symbol is in
ld-uClibc-0.9.21.so.

Any thoughts on how to resolve this?

Thanks.

Paul
-- 
Paul van Gool                                               Rincon Networks
paul.vangool at rinconnetworks.com                              (805)-705-1442



More information about the uClibc mailing list