Oracle® Solaris 11.2 Linkers and Libraries Guide

Exit Print View

Updated: July 2014

Instruction Set Specific Shared Objects

The dynamic token $ISALIST is expanded at runtime to reflect the native instruction sets executable on this platform, as displayed by the utility isalist(1). This token is available for filters, runpath definitions, and dependencies. As this token can expand to multiple objects, its use with dependencies is controlled. Dependencies obtained with dlopen(3C), can use this token with the mode RTLD_FIRST. Explicit dependencies that use this token will load the first appropriate dependency found.

Note - This token is obsolete, and might be removed in a future release of Oracle Solaris. See Capability Specific Shared Objects for the recommended technique for handling instruction set extensions.

Any string name that incorporates the $ISALIST token is effectively duplicated into multiple strings. Each string is assigned one of the available instruction sets.

The following example shows how the auxiliary filter can be designed to access an instruction set specific filtee

$ LD_OPTIONS='-f /opt/ISV/lib/$ISALIST/' \
    cc -o -G -K pic -h -R. foo.c
$ elfdump -d | egrep 'SONAME|AUXILIARY'
     [2]  SONAME             0x1      
     [3]  AUXILIARY         0x96                /opt/ISV/lib/$ISALIST/

Or alternatively the runpath can be used.

$ LD_OPTIONS='-f' \
    cc -o -G -K pic -h -R'/opt/ISV/lib/$ISALIST' foo.c
$ elfdump -d | egrep 'RUNPATH|AUXILIARY'
     [3]  AUXILIARY         0x96      
     [4]  RUNPATH           0xa2                /opt/ISV/lib/$ISALIST

In either case the runtime linker uses the platform available instruction list to construct multiple search paths. For example, the following application is dependent on and executed on a SUNW,Ultra-2.

$ ldd -ls prog
  find; required by ./
    search path=/opt/ISV/lib/$ISALIST  (RPATH from file ./
      trying path=/opt/ISV/lib/sparcv9+vis/
      trying path=/opt/ISV/lib/sparcv9/
      trying path=/opt/ISV/lib/sparcv8plus+vis/
      trying path=/opt/ISV/lib/sparcv8plus/
      trying path=/opt/ISV/lib/sparcv8/
      trying path=/opt/ISV/lib/sparcv8-fsmuld/
      trying path=/opt/ISV/lib/sparcv7/
      trying path=/opt/ISV/lib/sparc/

Or an application with similar dependencies is executed on an MMX configured Pentium Pro.

$ ldd -ls prog
  find; required by ./
    search path=/opt/ISV/lib/$ISALIST  (RPATH from file ./
      trying path=/opt/ISV/lib/pentium_pro+mmx/
      trying path=/opt/ISV/lib/pentium_pro/
      trying path=/opt/ISV/lib/pentium+mmx/
      trying path=/opt/ISV/lib/pentium/
      trying path=/opt/ISV/lib/i486/
      trying path=/opt/ISV/lib/i386/
      trying path=/opt/ISV/lib/i86/