This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: hidden symbol `__divdi3' is referenced by DSO


On Fri, 3 Dec 2004 18:34:17 +0100, Jakub Jelinek <jakub@redhat.com> wrote:
> This means that newlib was built incorrectly (-lgcc was not linked
> into that shared library).
> 
>         Jakub

newlib's libc.so has undefined references to __divdi3 and __udivdi3.
It seems to me these should have been resolved at the link time of
libc.so, from libgcc.a. libm.so does not have this problem. I'll see
if I can find the cause.

Cheers,
Shaun

$ readelf -s /usr/lib/newlib/libm.so | grep divdi3
$ readelf -s /usr/lib/newlib/libc.so | grep divdi3
   100: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __divdi3
   689: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __udivdi3


> On Fri, Dec 03, 2004 at 09:20:44AM -0800, Shaun Jackman wrote:
> > I built newlib (CVS 2004-12-02) as a native shared library for
> > i686-pc-linux-gnu. I'm now trying to link "Hello, world!" using the
> > newlib shared library. When I attempt the link, I get a "hidden
> > symbol" error. The same link works well if I link statically.
> >
> > I've googled around for the error message, and found a number of hits,
> > but no clear solutions. What does this error actually mean, and how do
> > I trouble shoot it?
> >
> > Please cc me in your reply. Thanks,
> > Shaun
> >
> > $ cc -nostdlib -L/usr/lib/newlib -Wl,-rpath /usr/lib/newlib
> > /usr/lib/newlib/crt0.o  hello.o  -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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]