From owner-freebsd-newbies Thu Jan 28 14:58:44 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA01692 for freebsd-newbies-outgoing; Thu, 28 Jan 1999 14:58:44 -0800 (PST) (envelope-from owner-freebsd-newbies@FreeBSD.ORG) Received: from anch01.customcpu.com (anch01.customcpu.com [198.70.210.44]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA01687 for ; Thu, 28 Jan 1999 14:58:43 -0800 (PST) (envelope-from al7oj@customcpu.com) Received: from [207.14.79.61] by anch01.customcpu.com (Post.Office MTA v3.1.2 release (PO205-101c) ID# 0-42538U2500L250S0) with ESMTP id AAA192; Thu, 28 Jan 1999 13:59:39 -0900 Date: Thu, 28 Jan 1999 13:58:32 -0900 (AKST) From: Mike Endsley X-Sender: al7oj@FreeBSDrulz To: Nik Clayton cc: Freebsd-newbies@FreeBSD.ORG Subject: Re: statically/dynamically based software In-Reply-To: <19990128214526.A11914@catkin.nothing-going-on.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-newbies@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Thank-you very much! I will save this for future reference (bad memory!). Mike On Thu, 28 Jan 1999, Nik Clayton wrote: > On Wed, Jan 27, 1999 at 02:16:01PM -0900, Michael A. Endsley wrote: > > Can some one tell me the difference between these 2 items? > > I want to download software, but the pages list for either of the 2. > > I am running FreeBSD 3.0-R as just a home user. > > It's all to do with libraries. > > When you load and run a "dynamic" program, the binary file doesn't contain > the whole of your program. Instead, it references libraries that contain > common routines. For example, "libc" contains most of the library of code > for standard C functions like printf(). > > If every program had to carry the code for printf() (and all the other > functions around) then they'd all be much larger. > > Instead, when your program runs it is "dynamically linked" with the > correct libraries. > > However, what if you're building a program, and you don't know for certain > that the right libraries will be available on the system it will run on? > Or you don't know that the version of the libraries on the target system > is correct? > > In this case, you can choose to link your program statically. If you do > this then all the code from the libraries that your program uses is > bundled in to the executable file, giving you a complete, standalone > binary that pretty much anyone can execute. This file is somewhat bigger > than a dynamically linked one, because it contains all the extra code. > > With your RealPlayer example -- it was probably compiled on a FreeBSD > -stable system (or possibly a direct release). However, people downloading > it might run it on a variety of different FreeBSD releases, and some of > those releases (-current in particular) will have different libraries, and > some of the library functions might have changed as well. > > Instead of providing lots of different binaries, and saying "Download 'x' > if you're running -stable, 'y' if you're running 2.2.7, 'z' if you're > running -current before 15th January 1999, and 'foo' if you're running > -current after 15th January 1999" they provide one, statically linked > binary that should run pretty much anywhere. > > Make sense? > > N > -- ---------------------------------------------------------------------------- What part of the term "operating system" doesn't Bill Gates understand? I have/run: Un*x (FreeBSD) Linux (Slakware, Debian1.3 and 2.0), OS/2Warp3.0, win* al7oj@customcpu.com al7oj@al7oj.#nak.ak.usa.noam al7oj@al7oj.ampr.org http://www.customcpu.com/personal/al7oj/ ---------------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-newbies" in the body of the message