This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

Problem resolving symbol in object indirectly included by another object.


I'm not sure if this is a fault or feature.  It does appear to operate
different than other platforms we're using...

We have a shared object (call it A) that is linked with code in a static
archive (call this B).  There are function calls in B that refer to
functions in libxml2.a (another static library).  There are no calls to
libxml2 directly from our code in the objects included in our shared
object (A).  

When I attempt to load the shared object, I get an error that a symbol
(xmlFree) that should have been resolved by including the libxml2 library
in the link of the shared object is undefined.  Using ldd and objdump,
this is confirmed.

I linked with a map of the shared object, it shows that libxml2.a is
loaded but there is no indication that the symbol(s) were resolved.  No
errors either.

If we put an unused libxml2 call in these objects, everything works fine.

Shouldn't a function call to a static archive that contains a function
call to another static archive work?

I've tried this in binutils-2.9.5 (RH6.2) and binutils-2.11.93 (RH7.3).

Any ideas?  Is this a bug?  Feature?  Cockpit error?  Thanks.



=====
---
Wayne Johnson,             | There are two kinds of people: Those 
3943 Penn Ave. N.          | who say to God, "Thy will be done," 
Minneapolis, MN 55412-1908 | and those to whom God says, "All right, 
(612) 522-7003             | then,  have it your way." --C.S. Lewis

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


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