[EMAIL PROTECTED] wrote:

No, this is another case.... In short you cannot dlopen a library with a : in the pathname

That seems like a bug.

Perhaps, but the intent has been to make all pathname processing within
ld.so.1 consistent.  FILTERS, RUNPATHS, LD_LIBRARY_PATH, dependencies, in
fact, all pathnames are funneled through the same engine, where tokens
are expanded ($ORIGIN, $HWCAP, etc), and multiple pathnames separated.

For example, you can use a token that can expand into multiple pathnames:

 #include <dlfcn.h>

 main()
 {
        dlopen("$ISALIST/foo.so", RTLD_FIRST | RTLD_LAZY);
 }
 % LD_DEBUG=files,libs ./main
 .....
 01488: 1: file=$ISALIST/foo.so;  dlopen() \
     called from file=main  [ RTLD_LAZY  RTLD_LOCAL  ....  RTLD_FIRST ]
 01488: 1:  trying path=amd64/foo.so
 01488: 1:  trying path=pentium_pro+mmx/foo.so
 01488: 1:  trying path=pentium_pro/foo.so
 .....

Effectively, the ISALIST token results in a ":" separated series of pathnames,
which are then processed one by one.

Similarly, you can hardcode the lookup yourself:

 #include <dlfcn.h>

 main()
 {
        dlopen("amd64/foo.so:pentium_pro+mmx/foo.so:pentium_pro/foo.so",
            RTLD_FIRST | RTLD_LAZY);
 }
 % LD_DEBUG=files,libs ./main
 .....
 01489: 1: file=amd64/foo.so:pentium_pro+mmx/foo.so:pentium_pro/foo.so; \
     dlopen() called from file=main  [ RTLD_LAZY  RTLD_LOCAL  ....  RTLD_FIRST ]
 01489: 1:  trying path=amd64/foo.so
 01489: 1:  trying path=pentium_pro+mmx/foo.so
 01489: 1:  trying path=pentium_pro/foo.so
 .....

Granted, the last scenario hasn't been widely advertised, and you could
achieve this, or the ISALIST scenario, by making a family of individual
dlopen() calls.  But the consistency of pathname processing, for all pathnames
used by ld.so.1, is intentional - whether everything has fallen out to be
as intuitive as we'd hoped ......

If a colon is required as part of a pathname, then perhaps it should be
available in any pathname processes by ld.so.1.  Either we need a way of
specifying an alternative pathname specifier, and simply escaping a ":",
or something else ....

--
Rod
_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to