From owner-freebsd-current Fri Jun 5 09:06:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA18611 for freebsd-current-outgoing; Fri, 5 Jun 1998 09:06:44 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from antipodes.cdrom.com (castles182.castles.com [208.214.165.182]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA18603 for ; Fri, 5 Jun 1998 09:06:40 -0700 (PDT) (envelope-from mike@antipodes.cdrom.com) Received: from antipodes.cdrom.com (localhost [127.0.0.1]) by antipodes.cdrom.com (8.8.8/8.8.5) with ESMTP id IAA01027; Fri, 5 Jun 1998 08:02:07 -0700 (PDT) Message-Id: <199806051502.IAA01027@antipodes.cdrom.com> X-Mailer: exmh version 2.0zeta 7/24/97 To: Luoqi Chen cc: mike@smith.net.au, current@FreeBSD.ORG Subject: Re: ppp libalias In-reply-to: Your message of "Fri, 05 Jun 1998 03:35:36 EDT." <199806050735.DAA17278@lor.watermarkgroup.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 05 Jun 1998 08:02:07 -0700 From: Mike Smith Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > > Brandon Lockhart wrote: > > > > > > > > > I remember there was a discussion, I didn't think this pertained to me. > > > > > How do we fix this ppp libalias problem? > > > > > > > > The easiest work-around is to create a symlink "/usr/lib/libalias.so.2.5" > > > > that points to "/usr/lib/aout/libalias.so.2.5". > > > > > > I don't see any compelling reason why dynamic loading is really needed. > > > IMHO, this is just a bad programming practice. > > > > Plenty of good reasons, most of them related to size. > > Could you be more specific? I don't quite understand. The library itself > is not big, 6 pages (5 text, 1 data, excluding 4 pages of bss). If you don't > use the -alias option, text and bss will not be touched, and you will waste > 1 page of data (modified by relocation). If you use the -alias option, > then the memory usage should be the same. We might end up saving some space > if the code to load and unload the library is removed and let ld.so do the > job during startup. The library occupies about 25k in its static form. This means that ppp is 25k bigger if you link it in. If you are building, eg. a router floppy, or (the original reason) the install floppy, and space is *tight*, having this module optional at runtime means you can use the standard ppp binary without having to do a custom rebuild. A better fix for this would be to be able to "soft-link" shared libraries; ie. have the runtime linker do the work and leave you with a vector indicating what had and hadn't been found. This would be 100% unportable though. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message