* J Sisson <sisso...@gmail.com> [2014-05-08 22:51]: > On Thu, May 8, 2014 at 9:03 PM, staticsafe <m...@staticsafe.ca> wrote: > > man ldd > > http://www.openbsd.org/cgi-bin/man.cgi?query=ldd&sektion=1 > > ldd won't help with statically linked binaries. > > # gcc -o dynamic_test test.c > # ldd dynamic_test > dynamic_test: > Start End Type Open Ref GrpRef Name > 00008000 00021000 exe 1 0 0 dynamic_test > 40ebe000 40fad000 rlib 0 1 0 /usr/lib/libc.so.73.1 > 42a7d000 42a7d000 rtld 0 1 0 /usr/libexec/ld.so > > # gcc -o static_test --static test.c > # ldd static_test > ldd: static_test: not a dynamic executable
Though one could also look for the lib/function/version calls within a non-stripped statically linked binary using nm and grep. Many many years ago (2001) Darrent Moffat wrote about the problems of using statically linked binaries or libraries. In fact, until later versions of Solaris, most compiles would often statically link binaries or libraries. Its quite interesting for me to have remembered it 13 years later and it still holds truth. http://marc.info/?l=openssh-unix-dev&m=98563522332517&w=2 -- | _o _ |_)o_ _ _ |_|_|(_||_|_> | \|/_/_(_) - Lucius.Tel -------------------------------------- ++ Bare feet magnetize sharp metal objects so they point upward from the ++ ++ floor -- especially in the dark. ++