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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
-----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----- |