Results 1 to 2 of 2
hi all:
first thank you very very much, whatever your help!!!!
i have two shared library, the second one will use some symbol which were lay in the first shared ...
- 04-12-2007 #1Just Joined!
- Join Date
- Apr 2007
- Posts
- 3
how to use another shared library symbol
hi all:
first thank you very very much, whatever your help!!!!
i have two shared library, the second one will use some symbol which were lay in the first shared library. when i dlopen(second.so, RTLD_NOW | RTLD_GLOBAL), it will faild ,it will report some undefined symbol(this symbol lies in the first shared library)
i have no permission to load the first shared library, the first shared library is load by the app, i don't know the load method whether is dynamic load or static load. but i can control the method of load the second shared library,i try use RTLD_LAZY to replace the RTLD_NOW, but report undefined a symbol(this symbol lies in the second library)
but, in the first shared library Makefile, i do as down:
$(TOPDIR)/$(TARGETDIR)/$(TARGET):
$(GCC) $(LINKOBJS) -fPIC -shared -Wl,--version-script=SymExport -o $@ -ldl -lpthread
in the script file SymExport, i do as down:
VERSION {
global:
want_export_symbol;
local: *;
};
i have try another method :
in the second shared library's Makefile
$(TOPDIR)/$(TARGETDIR)/$(TARGET):
$(GCC) $(LINKOBJS) -fPIC -shared -Wl,-export-dynamic -o $@ -ldl -lpthread
and use dlopen(second.so, RTLD_LAZY|RTLD_GLOBAL), but report undefined a symbol(this symbol lies in the second library)
who can help me!!!!!!!!!!!
Thank you !!!!!!!!!!!!!!!!!!!!!!!!!!11
- 04-12-2007 #2Just Joined!
- Join Date
- Apr 2007
- Posts
- 3
when i trace the course of load the second shared library, i can get the address the symbol which report undefined when load the second library.


Reply With Quote