how to see the list of reference of APIs of an library in my exe

This is a discussion on how to see the list of reference of APIs of an library in my exe within the Linux Networking forums, part of the Linux Forums category; Hello, How I can find list of references made to perticular library. For example my exe is using printf() from ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-26-2006
Datha
 
Posts: n/a
Default how to see the list of reference of APIs of an library in my exe

Hello,
How I can find list of references made to perticular library.
For example my exe is using printf() from libc.so. But i do not know
printf() has been references. And i want to know whether printf() is
referenced or not?
Is there any tool which lists external references
-datha

Reply With Quote
  #2 (permalink)  
Old 06-26-2006
Lew Pitcher
 
Posts: n/a
Default Re: how to see the list of reference of APIs of an library in my exe

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Datha wrote:
> Hello,
> How I can find list of references made to perticular library.
> For example my exe is using printf() from libc.so. But i do not know
> printf() has been references. And i want to know whether printf() is
> referenced or not?
> Is there any tool which lists external references


The nm(1) command lists all the symbols defined or used by an object
file. The list it generates will contain the symbol name, an indicator
of whether it is defined or not, and (for library symbols) the name of
the library in which the object file thinks that the symbol is defined.

The ldd(1) command prints the shared library dependancies of an object
file. This list names each library referenced by located (but not
linked) external references.

Examples:

lpitcher@merlin:~/code/permute$ ls -l
total 16
- -rwxr-xr-x 1 lpitcher users 11377 2006-06-26 10:47 permute*
- -rw-r--r-- 1 lpitcher users 616 2006-06-26 10:47 permute.c

lpitcher@merlin:~/code/permute$ ldd permute
libc.so.6 => /lib/libc.so.6 (0x40023000)
/lib/ld-linux.so.2 (0x40000000)


lpitcher@merlin:~/code/permute$ nm permute
080495e8 D _DYNAMIC
080496b4 D _GLOBAL_OFFSET_TABLE_
080485c0 R _IO_stdin_used
w _Jv_RegisterClasses
080495d8 d __CTOR_END__
080495d4 d __CTOR_LIST__
080495e0 d __DTOR_END__
080495dc d __DTOR_LIST__
....
080484b0 T __libc_csu_init
U __libc_start_main@@GLIBC_2.0
080496d8 A _edata
080496dc A _end
080485a0 T _fini
080485bc R _fp_hw
080482a0 T _init
08048300 T _start
08048324 t call_gmon_start
080496d8 b completed.1
080496cc W data_start
08048390 t frame_dummy
08048464 T main
080496d4 d p.0
080483f9 T permute
U printf@@GLIBC_2.0
080483c4 T rotate
U strlen@@GLIBC_2.0


HTH
- --
Lew Pitcher
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32) - WinPT 0.11.12

iD8DBQFEn/0PagVFX4UWr64RAlN5AKCp0Z9BaBilLGCRo9O9fMPsdHqJegCg 8C1/
8tEUwPNgySDNP0Ld97++Sfc=
=7bTc
-----END PGP SIGNATURE-----

Reply With Quote
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

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



All times are GMT +1. The time now is 02:28 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0