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/0PagVFX4UWr64RAlN5AKCp0Z9BaBilLGCRo9O9fMPsdHqJegCg8C1/
8tEUwPNgySDNP0Ld97++Sfc=
=7bTc
-----END PGP SIGNATURE-----

.



Relevant Pages

  • Re: A list of archaeological connections would be nice
    ... They give references. ... big-word stories are lists and lists lists of names and dates ... give proper scholarly references. ... Yes, it's not my fault, and no, ...
    (sci.archaeology)
  • Re: Error 3464 with dCount - some computers only
    ... a minor correction to my original post. ... The SQL for the query which is producing the error in the dcount statement ... restarted and re-installed all references ... Reference lists on both computers again identical. ...
    (microsoft.public.access.formscoding)
  • Re: why cannot assign to function call
    ... it's not the assignment model which is strange at all. ... I want *Python* semantics, and amazingly enough, that's ... there are no references and no dereferencing. ... lists and tuples store *objects*. ...
    (comp.lang.python)
  • Re: An oddity in list comparison and element assignment
    ... I'm not convinced that equality shouldn't imply invariance ... for each corresponding element in the two lists, ... have other references bound to them. ... equality test has to claim that l1 and l3 are not equal, ...
    (comp.lang.python)
  • Re: GC performance - GC fragility
    ... it the option to permanently let the developer to think about how ... Now remove the object pointer from one of these lists. ... in question is doing by keeping those 10 references in those 10 lists. ... I don't really see that this is a question of GC vs non-GC, ...
    (borland.public.delphi.non-technical)