Re: understanding statically-linked binaries

From: Philipp Buehler (pb_at_usenet-oct-2003.fips.de)
Date: 10/06/03


Date: Mon, 6 Oct 2003 08:10:08 +0000 (UTC)


* Peter (usenet@ointment.org) wrote:
> If 'ldd' can show you what libs an executable is dynamically linked
> against, is there a way to determine after the fact what libs a given
> statically-linked binary was built with? I'm really trying to figure out
> a way to ensure that nothing gets left out when I upgrade packages like
> OpenSSL (without using RPMs).

"no way" as in "easy command to use". ld will pick the needed functions
from the lib, link it and then any direct trace is gone.

With some clue about how executables are linked together on your
system, nm(1) and objdump(1) you might figure out (if these or
similar tools are existent on your system - but I guess so from 'RPM' :))

IF there are nice programmers, what(1) could work, too. Or in last
consequence strings(1).

More ways? Probably..

ciao

-- 
"Unix was the first OS where you could carry the media and system
documentation around in a briefcase. This was fixed in BSD4.2."


Relevant Pages

  • Re: .EXE -> .ASM -> .EXE
    ... a linker will only include those object modules that ... No wonder you think LIBs are bad; ... operating under a serious misconception here. ... C/C++ executables. ...
    (alt.lang.asm)
  • 32/64 bit library problems
    ... I am running CentOS 3.5 on a 64 bit system. ... When I run 'ldd libphp4.so', one of the shared libs ... I've installed net-snmpd from both source and rpms, ...
    (alt.os.linux.redhat)
  • Re: 64 bit imagemagick
    ... Frank Liu writes: ... But the imagemagick lib is 32 bit only. ... just copying the libs it creates ... executables, ...
    (comp.unix.solaris)
  • Re: copy a list in 1 instruction
    ... screw things up if you have done static linking with LIBs for 1+ ... You need to link with the same RTL in DLL form for both executables or make ... the damage shows up. ...
    (microsoft.public.vc.stl)
  • Re: upgrade glibc disaster
    ... Sure - but one has to be careful about which arch rpms to choose! ... I can tell you that if an error occurs in an install process, ... chroot to the failed system until absolutely all his libs are restored. ... If he has a working rescue system with access to old rpms, ...
    (alt.os.linux)