the definitive ordering of -l searches 
Author Message
 the definitive ordering of -l searches

Unfortunately I am using a number of systems for which there
is incomplete documentation, or worse, documentation that does
not describe the software on the system (but aren't we all).

I have been unable to find a definitive statement of how various
loaders actually implement the search for -l<lib> files.

Now one has a list of directories d1, d2, ..., dn as specified
by -L flags and some environment variables (the names of which
escape me) and some built-in directories (e.g., /lib /usr/lib).

One has a set of patterns that constitute valid library names for
a library X:

        libX.a
        libX.sa
        libX.so
        libX.so.<version-number>  (e.g., libS.so.4, libX.so.4.1.1)
        libX.lib
        libX.sl

Sometimes a search may be modified if a flag, such as -pg or -g
is specified.

I am trying to build a mechanism and its appropriate configuration
parameters that can cope with most rational systems thus need to
arrive at a set of precedence rules for directories and suffixes.
I did have such a mechanism but gnu broke it (as it did so many things).

Q. Has anyone ever encountered a system in which the suffix search
   takes precedence over the directory search?

Q. What is the ordering of suffixes?  Testing on my systems appear
   to indicate that libX.so.<version> > libX.so > libX.a
   but that just may be an accident.

Q. Given two libX.so.<version> files with differing numbers of parts,
   is libX.so.4 < libX.so.4.1?

Q. I seem to remember some documentation that suggested that a
   specific version of an solib could be selected using something
   like -lX.4.  What systems do you know of that support this
   mechanism.

Q. What additional modifications to the search mechanism can be
   affected by flags and/or environment variables?

I am interested in all system, even drek from Redmond.

Please reply to me directly (as I typically avoid this newsgroup)
and I will summarize.

--

+1 416 925 8168                 247 Brunswick Ave., Toronto, Canada
                                M5S 2M6



Sat, 16 Jan 1999 03:00:00 GMT  
 the definitive ordering of -l searches

Quote:

> Unfortunately I am using a number of systems for which there
> is incomplete documentation, or worse, documentation that does
> not describe the software on the system...

Even more unfortunate is your posting this pollution to comp.lang.c:

Quote:
> I have been unable to find a definitive statement of how various
> loaders actually implement the search for -l<lib> files.
[noise snipped]
> Now one has a list of directories d1, d2, ..., dn as specified
> by -L flags and some environment variables (the names of which
> escape me) and some built-in directories (e.g., /lib /usr/lib).
> Sometimes a search may be modified if a flag, such as -pg or -g
> is specified.

[more noise snipped]
Quote:
> Q. What is the ordering of suffixes?  Testing on my systems appear
>    to indicate that libX.so.<version> > libX.so > libX.a
>    but that just may be an accident.
> Q. I seem to remember some documentation that suggested that a
>    specific version of an solib could be selected using something
>    like -lX.4.  What systems do you know of that support this
>    mechanism.

[even more noise snipped]

Quote:
> Please reply to me directly (as I typically avoid this newsgroup)
> and I will summarize.

No.

It's quite obvious that you avoid this newsgroup. It's equally obvious
that to a person capable of even rudimentary thought, comp.lang.c is
for the discussion of the C Language. Check news.announce.newusers
to determine how to find the proper newsgroup for your query/ies.

--
=============================================================================

     linux for fun, M$ for $$$...and the NFL for what really counts!
=============================================================================



Sun, 17 Jan 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. level order binary search

2. Importlib search order

3. Need to make compiler search directories in specific order

4. Include Search Order

5. link search order with /nodefaultlib

6. Include File Search Order

7. Include File Search Order

8. Need to make compiler search directories in specific order

9. the order of searching included files

10. (DLL,RC) search order for resource in EXE and DLL

11. Definitive information on ToolBoxBitmap attribute

12. A definitive list of common libraries

 

 
Powered by phpBB® Forum Software