*BSD News Article 50934


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!zombie.ncsc.mil!news.gmi.edu!usenet.eel.ufl.edu!col.hp.com!sdd.hp.com!swrinde!howland.reston.ans.net!news.sprintlink.net!in1.uu.net!shore!news
From: witr@spooky.rwwa.com
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: ld.so failed
Date: 8 Sep 1995 13:08:20 GMT
Organization: R.W. Withrow Associates
Lines: 50
Message-ID: <42pf84$11o@shore.shore.net>
References: <42dk7r$r6n@shore.shore.net> <42idb0$b6k@helena.MT.net> <42kebn$9ph@shore.shore.net> <42n7f7$s6g@helena.MT.net>
NNTP-Posting-Host: rwwa.com

     Nate Williams wrote in article <42n7f7$s6g@helena.MT.net> :

>The only reason it would fail aside from 'can't find ld.so' is because
>it can't mmap() either the executable or shlibs into memory.  I'm not
>sure this is any better than 'ld.so failed'.

There.  You have listed two reasons (and probably more, if you
consider the various reasons why mmap could fail).  And, I've found
you can leave off a library, like -lm, and you get no message until
``ld.so failed''.  It is easy to do this sort of thing (since how
would you know that adding -lfoo requires you to also add -lm), and
the resulting message is silly.

Besides which, there are other messages that come from the activator,
like ``permission denied'' *with* the failing library name inserted.

>>If we added 1024 bytes and we had 1024 programs, it would add a 
>>whole Mb to the distribution.  Big deal.
>
>On my laptop, it *is* a big deal.  Also, each program uses another K of
>memory for execution, so however many programs you have in memory *may*
>be increased by a 4K margin.  (Doubtful, but on the average 25% of the
>program would add an extra 4K page, so we're adding an average of 1K
>extra/program)
>
>This sounds anal [...]

It does, but then we all have something we are anal about.

But, let me pick this argument apart bit by byte:  ;-)

1) I listed 1024 as an outer bound.  1024 bytes is a *lot* of text.
2) I listed 1024 as an conservative estimate of programs.
   bash$ ls -1 /usr/bin /usr/local/bin /usr/X11R6/bin /bin /sbin /usr/sbin | wc
         827     822    5685

3) If you are running in a restricted environment you would reduce the
   number of programs, and not restrict the sensible design of the
   system.  Otherwise we would do something eliminate all messages and
   just print a number, and tell people to look it up in a book.  On a
   laptop you can always run compressed images anyway.
4) Spilling to another page is *not* a significant increase in text
   size.
5) Besides, ld.so *is* dynamically loaded, isn't it?  So this whole
   thing is moot, right?

-----------------------------------------------------------------------------
Robert Withrow, Tel: +1 617 598 4480, Fax: +1 617 598 4430 Net: witr@rwwa.COM
     R.W. Withrow Associates, 319 Lynnway Suite 201, Lynn MA 01901 USA