LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-17-2012, 07:43 PM   #1
doughyi8u
Member
 
Registered: Apr 2010
Posts: 254

Rep: Reputation: 10
how to tell what files are in a shared object (.so)


Code:
ar -t archivename.a
will list all the object files in said archive. Is there a way to do this for shared objects?

Thanks for any help.
 
Old 07-18-2012, 01:21 AM   #2
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 509

Rep: Reputation: 203Reputation: 203Reputation: 203
My understanding is that a shared object (.so file) is a single file, and not an archive of files like libraries (.a files), which means there are no other files within a shared object.

If you're after a list of the symbols from the shared object file, you can try running "nm -D file.so", for example:
Code:
nm -D /usr/lib/libssl3.so
 
1 members found this post helpful.
Old 07-18-2012, 05:58 AM   #3
gchen
Member
 
Registered: May 2012
Location: Beijing China
Distribution: Asianux
Posts: 56

Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by cliffordw View Post
My understanding is that a shared object (.so file) is a single file, and not an archive of files like libraries (.a files), which means there are no other files within a shared object.

If you're after a list of the symbols from the shared object file, you can try running "nm -D file.so", for example:
Code:
nm -D /usr/lib/libssl3.so

1) just like what cliffordw said.

2) and for .so, also can use objdump to get more informations.

3) for .a is only for linker use (it is just the group of .o which is intermedia binary file). .so is loaded by OS when a process need (it is an executable binary).


: )
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
data sharing between c++ shared object and Fortran shared object Madhubala Debian 2 08-19-2011 02:22 AM
Compile shared object files using valac Kenny_Strawn Programming 1 10-20-2010 08:33 PM
error while loading shared libraries: libhid.so.0: cannot open shared object file: No misungs Linux - Software 4 06-10-2009 12:05 PM
Adding object files to shared objects gopherq Linux - Software 3 06-25-2008 01:21 PM
distributing shared object files to client linux emprise Programming 1 02-06-2008 07:52 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration