JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris 11.1 Linkers and Libraries Guide     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information


Part I Using the Link-Editor and Runtime Linker

1.  Introduction to the Oracle Solaris Link Editors

2.  Link-Editor

3.  Runtime Linker

4.  Shared Objects

Part II Quick Reference

5.  Link-Editor Quick Reference

Part III Advanced Topics

6.  Direct Bindings

7.  Building Objects to Optimize System Performance

8.  Mapfiles

9.  Interfaces and Versioning

10.  Establishing Dependencies with Dynamic String Tokens

Capability Specific Shared Objects

Reducing Filtee Searches

Instruction Set Specific Shared Objects

Reducing Filtee Searches

System Specific Shared Objects

Locating Associated Dependencies

Dependencies Between Unbundled Products


11.  Extensibility Mechanisms

Part IV ELF Application Binary Interface

12.  Object File Format

13.  Program Loading and Dynamic Linking

14.  Thread-Local Storage

Part V Appendices

A.  Linker and Libraries Updates and New Features

B.  System V Release 4 (Version 1) Mapfiles


System Specific Shared Objects

The dynamic tokens $OSNAME, $OSREL, $PLATFORM and $MACHINE are expanded at runtime to provide system specific information. These tokens are available for filters, runpath, or dependency definitions.

$OSNAME expands to reflect the name of the operating system, as displayed by the utility uname(1) with the -s option. $OSREL expands to reflect the operating system release level, as displayed by uname -r. $PLATFORM expands to reflect the underlying platform name, as displayed by uname -i. $MACHINE expands to reflect the underlying machine hardware name, as displayed by uname -m.

The following example shows how the auxiliary filter can be designed to access a platform specific filtee

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

This mechanism is used in the Oracle Solaris OS to provide platform specific extensions to the shared object /lib/