hidden symbol `__divdi3' is referenced by DSO

Jeff Johnston jjohnstn@redhat.com
Thu Dec 2 20:16:00 GMT 2004


Works fine for me.

It looks like you need an rpath specified.  Try adding:

-Wl,-rpath /home/sjackman/lib/newlib

-- Jeff J.

Shaun Jackman wrote:
> When trying to link "Hello, world!" with a native shared newlib
> library, I get this hidden symbol error. The same application links
> perfectly with -static.
> 
> Thanks in advance for any help you can give.
> 
> Please cc me in your reply. Cheers,
> Shaun
> 
> newlib 1.12.0 (CVS 2004-11-26)
> gcc 3.3.4
> 
> $ cc -g -O2 -W -Wall -Werror -I/home/sjackman/include/newlib -nostdlib
> -L/home/sjackman/lib/newlib /home/sjackman/lib/newlib/crt0.o  hello.c 
> -lc -lm -lgcc -o hello
> /usr/bin/ld: hello: hidden symbol `__divdi3' in
> /usr/lib/gcc-lib/i486-linux/3.3.4/libgcc.a(_divdi3.oS) is referenced
> by DSO
> collect2: ld returned 1 exit status
> make: *** [hello] Error 1
> $ cc --version | head -1
> cc (GCC) 3.3.4 (Debian 1:3.3.4-13)



More information about the Newlib mailing list