The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > Filesystems, Disks and Memory
Google UNIX.COM
Home Forums Register Rules & FAQ Members List Arcade Search Today's Posts Mark Forums Read


Filesystems, Disks and Memory Questions involving NAS, SAN, RAID, Robotic Libraries, backups, etc go here.


Other UNIX.COM Threads You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Dependent Object Framework 0.9 (Default branch) iBot Software Releases - RSS News 0 02-04-2008 08:10 PM
Script execution dependent upon a file landing in a certain directory keladar Shell Programming and Scripting 3 12-27-2007 06:19 PM
how to find a file named vijay in a directory using find command amirthraj_12 UNIX for Dummies Questions & Answers 5 10-25-2006 02:39 PM
Job dependent on other job pankajkrmishra Shell Programming and Scripting 4 09-10-2006 11:26 PM
Editor dependent error? new2ss Shell Programming and Scripting 2 02-16-2006 10:18 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-28-2008
Registered User
 

Join Date: Mar 2008
Posts: 2
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
How to find Dependent libraries in ELF file?

Dear group,

I need to load dependent libraries for an application which is in ELF format.please let me know how to parse the ELF file to find dependent libraries.

thnaks in advance,
Ravinder
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 03-31-2008
sysgate's Avatar
Unix based
 

Join Date: Nov 2006
Location: /root
Posts: 1,070
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
If I got it correct, "ldd" is what you need, example :
Quote:
ldd /usr/lib/aspell-0.60/context-filter.so
linux-gate.so.1 => (0x00110000)
libaspell.so.15 => /usr/lib/libaspell.so.15 (0x00118000)
libdl.so.2 => /lib/libdl.so.2 (0x001d9000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x001de000)
libm.so.6 => /lib/libm.so.6 (0x002c9000)
libc.so.6 => /lib/libc.so.6 (0x002f2000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0044b000)
/lib/ld-linux.so.2 (0x009ab000)
Reply With Quote
  #3 (permalink)  
Old 04-03-2008
Registered User
 

Join Date: Mar 2008
Posts: 2
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
thanks for your replay,

yes you are right the the ldd tool lists the dependent shared libraries that the executable requires, along with their paths if found.

But i want to write an application which shoud do the same functionality.
Please suggest me how to interprete the ELF file to collect the information.
i need exactly as LDD tool.
Reply With Quote
  #4 (permalink)  
Old 04-04-2008
sysgate's Avatar
Unix based
 

Join Date: Nov 2006
Location: /root
Posts: 1,070
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
I'm not sure for the programming part, but you can always look at the source code for this tool and start writing your own. Another similar binary which does almost the same is "fdebuginfo" :
Quote:
Displays the Debuginfo paths for a process and its shared modules
Reply With Quote
Google UNIX.COM
Reply



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 08:25 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102