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]

Re: A symbol in a shared library, which has already been resolved.


tanaka <tanaka@personal-media.co.jp> writes:

> This sample says,
> >./libtest.so: undefined reference to `temtem'
> .
> 
> MAIN() has already been resolved, without libtest.so.1.
> Why MAIN() in libtest.so.1 is referenced?

Because shared libraries are not archive libraries.  When you link
against a shared library, you get all of the associated objects,
including all of their references.

That said, you can use the --allow-shlib-undefined option to permit
shared libraries to have undefined references.  You will be fine as
long as none of the undefined references are required at run time.

Ian


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