From owner-freebsd-questions Sat Feb 8 18:30:57 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id SAA17731 for questions-outgoing; Sat, 8 Feb 1997 18:30:57 -0800 (PST) Received: from spitfire.ecsel.psu.edu (qmailr@spitfire.ecsel.psu.edu [146.186.218.51]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id SAA17718 for ; Sat, 8 Feb 1997 18:30:54 -0800 (PST) Received: (qmail 21102 invoked by uid 1000); 9 Feb 1997 02:29:35 -0000 Message-ID: <19970209022935.21101.qmail@spitfire.ecsel.psu.edu> To: Allen Hyer cc: freebsd-questions@freebsd.org Subject: Re: static vs. dynamically linked binaries In-reply-to: Your message of "Sat, 08 Feb 1997 19:40:31 CST." <3.0.1.32.19970208194031.0075a288@wtrt.net> Date: Sat, 08 Feb 1997 21:29:35 -0500 From: Dan Cross Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > Is there any way to figure out if a binary was linked statically or > dynamically? I have some binaries around that I don't have the sources > installed for. Can I tell with just the binary, or do I need to go back to > the sources? I think that file(1) will do the trick. : big-o; file /bin/sh /bin/sh: BSD/i386 compact demand paged executable : big-o; file /usr/bin/cc /usr/bin/cc: BSD/i386 compact demand paged dynamically linked executable : big-o; - Dan C.