Programowanie w systemie UNIX/depend: Różnice pomiędzy wersjami

Z Wikibooks, biblioteki wolnych podręczników.
Usunięta treść Dodana treść
m ref
Linia 13: Linia 13:
objdump -p /path/to/program | grep NEEDED
objdump -p /path/to/program | grep NEEDED


lub <ref>[http://unix.stackexchange.com/questions/120015/how-to-find-out-the-dynamic-libraries-executables-loads-when-run unix.stackexchange question how-to-find-out-the-dynamic-libraries-executables-loads-when-run]</ref>
lub <ref>[http://unix.stackexchange.com/questions/120015/how-to-find-out-the-dynamic-libraries-executables-loads-when-run unix.stackexchange question how-to-find-out-the-dynamic-libraries-executables-loads-when-run]</ref><ref>[http://stackoverflow.com/questions/6242761/how-do-i-find-the-direct-shared-object-dependencies-of-a-linux-elf-binary stackoverflow question how-do-i-find-the-direct-shared-object-dependencies-of-a-linux-elf-binary]</ref>


readelf -d /bin/ls | grep 'NEEDED'
readelf -d /bin/ls | grep 'NEEDED'

Wersja z 19:42, 16 lis 2016


Jak sprawdzić zależności ?

wykonywalny program

Za pomocą komendy ldd[1]

 ldd /path/to/program

lub bezpieczniej ( program ldd moż e uruchamiać badany program co jest potencjalnie szkodliwe gdy pochodzi z nieznanego źródła) [2]

 objdump -p /path/to/program | grep NEEDED

lub [3][4]

 readelf -d /bin/ls | grep 'NEEDED'

czynny proces

  sudo pldd <PID>


 sudo pmap <PID>

Źródła

  1. man ldd
  2. How to check what libraries are used by a program or process on Linux Posted on August 7, 2014 by Dan Nanni
  3. unix.stackexchange question how-to-find-out-the-dynamic-libraries-executables-loads-when-run
  4. stackoverflow question how-do-i-find-the-direct-shared-object-dependencies-of-a-linux-elf-binary