Chris Miller wrote: > On Tue, May 18, 2010 at 6:13 PM, DDD <[email protected]> wrote: > > Chris Miller wrote: > >> On Mon, May 17, 2010 at 6:49 PM, DDD <[email protected]> wrote: > >> > Hi, > >> > By default all symbols are visible in a linux shared library, but in > >> > my case some class doesn't been exported? > >> > > >> > Any suggestions? > >> > >> Sure it isn't namespace private? > >> > > > > Thanks very much for your answer. And Maybe I have to describe the > > question clearly. > > > > Using nm to check the .so, some functions be showed with t tag, such > > as > > $> nm libmy.so > > ... > > 00000080 t Close() > > ... > > > > And t means CLose function is a local symbol, cann't be used by > > another program. > > > > Is that right? > > http://linux.die.net/man/1/nm > > | "T" > | The symbol is in the text (code) section.
The symbol type. At least the following types are used; others are, as well, depending on the object file format. If lowercase, the symbol is local; if uppercase, the symbol is global (external). http://www.linuxjournal.com/article/6463?page=0,1 Every relocatable object file has a symbol table and associated symbols. In the context of a linker, the following kinds of symbols are present: * Global symbols defined by the module and referenced by other modules. All non-static functions and global variables fall in this category. * Global symbols referenced by the input module but defined elsewhere. All functions and variables with extern declaration fall in this category. * Local symbols defined and referenced exclusively by the input module. All static functions and static variables fall here. > > I have no idea what that means. It is also possible that your library > is using a calling convention that C/C++ or whatever you're using > can't handle. (Although I thought that GCC normalised .so files to a > standard calling convention?) > > Also applicable is that if you're linking against a .so file, you need > a header to declare what's in there. Because Close() lacks any C++ > name munging, I'd imagine it's a C function, in which case you'd need > to declare it like so: > > extern "C" { > void Close(); > } > I try that also, but no help. > Or whatever the actual function signature is. > > I'm just speculating wildly though; chances are you haven't imported > the right header or something if you're having to tear apart a .so > file looking for function signatures. > > -- > Registered Linux Addict #431495 > For Faith and Family! | John 3:16! > http://www.fsdev.net/ > > -- > You received this message because you are subscribed to the Linux Users Group. > To post a message, send email to [email protected] > To unsubscribe, send email to [email protected] > For more options, visit our group at > http://groups.google.com/group/linuxusersgroup -- You received this message because you are subscribed to the Linux Users Group. To post a message, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit our group at http://groups.google.com/group/linuxusersgroup
