Subject: Re: Why do I need to add an entry into ld.so.conf?
To: None <port-i386@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
Date: 03/23/2005 20:23:55
>>> Why is the "-L" options not sufficient? Why is an extra "-R"
>>> option pointing to the same directory needed?
>> Because the people who designed the NetBSD shared-library
>> infrastructure decided to support unusual configurations such as
>> linking against libraries that aren't where they will end up at run
>> time (which is a good thing) and decided to provide this flexibility
>> in a way that complicated, not simplified, the common case (which is
>> a bad thing).
> This complexity is necessary,
Yes. Well, perhaps not _necessary_, but certainly highly desirable.
> and we did not design it. It is part of the ELF standard.
The command-line interface to cc is part of the ELF standard!?
There is no reason we couldn't have chosen to, for example, default the
-R path to be identical to the -L path if no run path is given. This
would make the common case work with less confusion and no need for
additional options, while still leaving the full power available
for those cases where that default is inappropriate. Or -R could
default to all -L options that give absolute paths, or it could default
-R to -L but warn if a relative path is included. There are plenty of
In choosing not to do that, the designers of the NetBSD interface (even
if "designers" only to the extent of choosing which existing
implementation to adopt) chose to provide the flexibility in a way that
complicates, rather than simplifying, the common case (of links which
are to run in the same environment the link is done in).
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML email@example.com
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B