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: undefined symbols in shared libraries


When I use the combination 

-Xlinker --no-allow-shlib-undefined -Xlinker --error-unresolved-symbols

I also get complaints about symbols in the loader like so:

/lib/libc.so.6: undefined reference to `_dl_lookup_symbol@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_map_object@GLIBC_PRIVATE'

I did get an exit status of 1, which is desired.


-> g++ -Wl,-z,defs -fpic -shared -Wl,-soname,libTestCase_interGNUrt.so
-o libTestCase_interGNUrt.so testCase_interGNUrt.o
testCase_interGNUrt.o(.text+0x1d8): In function
`testCase_inter::trigger2()':
: warning: undefined reference to `testCase_exc::Propagate()'
testCase_interGNUrt.o(.text+0x23f): In function
`testCase_inter::thrower()':
: warning: undefined reference to
`testCase_exc::testCase_exc[in-charge]()

-> echo $status
0


-> g++ -Wl,-z,defs -Wl,-no-allow-shlib-undefined -fpic -shared
-Wl,-soname,libTestCase_interGNUrt.so -o libTestCase_interGNUrt.so
testCase_interGNUrt.o
testCase_interGNUrt.o(.text+0x1d8): In function
`testCase_inter::trigger2()':
: undefined reference to `testCase_exc::Propagate()'
testCase_interGNUrt.o(.text+0x23f): In function
`testCase_inter::thrower()':
: undefined reference to `testCase_exc::testCase_exc[in-charge]()'
/lib/libc.so.6: undefined reference to
`_dl_lookup_versioned_symbol_skip@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_rtld_global@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to
`_dl_lookup_versioned_symbol@GLIBC_PRIVATE'
.........
/lib/libc.so.6: undefined reference to `_dl_map_object@GLIBC_PRIVATE'
collect2: ld returned 1 exit status

> g++ -Wl,-z,defs -Wl,-error-unresolved-symbols -fpic -shared
-Wl,-soname,libTestCase_interGNUrt.so -o libTestCase_interGNUrt.so
testCase_interGNUrt.o
testCase_interGNUrt.o(.text+0x1d8): In function
`testCase_inter::trigger2()':
: warning: undefined reference to `testCase_exc::Propagate()'
testCase_interGNUrt.o(.text+0x23f): In function
`testCase_inter::thrower()':
: warning: undefined reference to
`testCase_exc::testCase_exc[in-charge]()'
-> echo $status
0

I can supply the code for the test case if that is any help.

Robert

On Thu, 2004-03-11 at 11:30, Nick Clifton wrote:
> Hi Robert,
> 
> > That didn't do the trick either.
> >
> > `_ZN23thr_ThreadSingletonBaseI18rgx_ReCompileCacheEC9Ev':
> > : warning: undefined reference to `thr_GlobalLock::Unlock()'
> 
> Ah...umm it should have.  What is the full command line that you are
> using ?
> 
> Cheers
>         Nick
> 
> PS.  What about:
> 
>   --no-allow-shlib-undefined --error-unresolved-symbols
>   
-- 
Robert Schweikert <Robert.Schweikert@abaqus.com>
ABAQUS


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