Oracle® Solaris 11.2 Linkers and Libraries Guide

Exit Print View

Updated: July 2014

Linker and Libraries Updates and New Features

This appendix provides an overview of the updates and new features that have been added to releases of the Oracle Solaris OS.

Oracle Solaris 11.2 Release

  • The link-editor can decompress and compress debug sections. See Compressed Debug Sections and Section Compression.

  • Improved synchronization between runtime auditors and process initialization is provided with the la_callinit() and la_callentry() functions. See Audit Interface Functions and Audit Interface Control Flow.

  • The –z relax option can be used to relax items of the link-editor's default validity checking. This option allows the creation of an output object that would otherwise be rejected. The –z relax option supersedes the –t and –z relaxreloc options. See ld (1) ).

  • Greater flexibility in option processing is provided with the link-editor –z type option, and the additional LD_UNSET, LD_{object-type}_OPTIONS and LD_{object-type}_UNSET environment variables. See Specifying the Link-Editor Options.

  • The new –F option to elfdump (1) provides output format options.

  • Stub objects can omit symbols found in the associated real object. This technique prevents the use of those symbols in new code development that link against the stub object, while maintaining the symbols in the real object for backward compatibility. See Using Stub Objects to Hide Obsolete Interfaces.

Oracle Solaris 11.1 Release

  • Ancillary objects allow debug sections that are not required at runtime to be written to a separate object file. See Ancillary Objects.

  • Parent Objects simplify the construction of plugin objects, by allowing a plugin to link directly against its parent. See Parent Objects.

  • ld (1) provides the –z aslr option to provide per-object control of Address Space Layout and Randomization. elfedit (1) has been modified to allow simplified editing of the associated DT_SUNW_ASLR dynamic section entry. See Table 13–12.

Oracle Solaris 11

Oracle Solaris 10 1/13 Release

  • Greater flexibility in discarding unused material from a link-edit is provided with the link-editor –z discard-unused option. See Removing Unused Material.

  • Greater flexibility in stripping nonessential sections from an object is provided with the link-editor –z strip-class option. The –z strip-class option supersedes the older –s option, and provides finer grained control over the sections to be stripped.

Oracle Solaris 10 8/11 Release

  • The link-editor can create stub objects. Stub objects are shared objects, built entirely from mapfiles, that supply the same linking interface as the real object while containing no code or data. Stub objects can be built very quickly by the link-editor, and can be used to increase build parallelism and to reduce build complexity. See Stub Objects.

  • The link-editor can provide guidance in creating high quality objects using the –z guidance option. See ld (1) .

  • Archive processing now allows the creation of archives greater than 4 Gbytes in size.

  • Local auditors can now receive la_preinit() and la_activity() events. See Runtime Linker Auditing Interface.

  • A more robust model for testing for the existence of functionality is provided with deferred dependencies. See Testing for Functionality and Providing an Alternative to dlopen().

  • A new mapfile syntax is provided. See Chapter 8, Mapfiles. This syntax provides a more human readable, and extensible language than the original System V Release 4 language. Full support for processing original mapfiles is maintained within the link-editor. See Appendix B, System V Release 4 (Version 1) Mapfiles for the original mapfile syntax and use.

  • Individual symbols can be associated with capability requirements. See Identifying Capability Requirements. This functionality provides for the creation of a family of optimized functions within a dynamic object. See Creating a Family of Symbol Capabilities Functions, and Capabilities Section.

  • Objects that are created with the link-editor, and contain Oracle Solaris specific ELF data, are tagged with ELFOSABI_SOLARIS in the e_ident[EI_OSABI] ELF header. Historically, ELFOSABI_NONE has been used for all objects. This change is primarily of informational value, as the runtime linker continues to consider ELFOSABI_NONE and ELFOSABI_SOLARIS to be equivalent. However, elfdump (1) , and similar diagnostic tools, can use this ABI information to produce more accurate information for a given object.

  • elfdump (1) has been extended to use the value of e_ident[EI_OSABI] ELF header, or the new –O option, to identify ELF data types and values that are specific to a given ABI, and to use this information to provide a more accurate display of the object contents. The ability to display ABI-specific information in objects from the Linux operating system has been greatly expanded.

  • The segment mapping information for an object that is loaded with a process can be obtained using the dlinfo (3C) flags RTLD_DI_MMAPCNT and RTLD_DI_MMAPS.

  • The link-editor recognizes a number of GNU link-editor options. See ld (1) .

  • The link-editor provides cross linking for SPARC and x86 targets. See Cross Link-Editing.

  • The link-editor now provides for merging SHF_MERGE | SHF_STRING string sections. See Section Merging.

  • The merging of relocation sections when creating executables and shared objects is now the default behavior. See Combined Relocation Sections. This behavior used to require the link-editor's –z combreloc option. The –z nocombreloc is provided to disable this default behavior, and preserve the one-to-one relationship with the sections to which the relocations must be applied.

  • ELF objects can be edited with the new utility elfedit (1) .

  • Arbitrary data files can be encapsulated within ELF relocatable objects using the new utility elfwrap (1) .

  • Additional symbol visibility attributes are provided. See the exported, singleton and eliminate attribute descriptions under SYMBOL_SCOPE / SYMBOL_VERSION Directives and Table 12–23.

  • The link-editor, and associated ELF utilities have been moved from /usr/ccs/bin to /usr/bin. See Invoking the Link-Editor.

  • Symbol sort sections have been added, that allow for simplified correlation of memory addresses to symbolic names. See Symbol Sort Sections.

  • The symbol table information that is available with dynamic objects has been extended with the addition of a new .SUNW_ldynsym section. See Symbol Table Section and Table 12–5.

  • The format of configuration files that are managed with crle (1) has been enhanced for better file identification. The improved format ensures that the runtime linker does not use a configuration file generated on an incompatible platform.

  • New relocation types have been added that use the size of the associated symbol in the relocation calculation. See Relocations.

  • The –z rescan-now, –z recan-start, and –z rescan-end options provide additional flexibility in specifying archive libraries to a link-edit. See Position of an Archive on the Command Line.

Obsolete Feature

The following items have been made obsolete. These items provided internal, or seldom used features. Any existing use of the associated ELF definitions is ignored, however the definitions can still be displayed by tools such as elfdump (1) .


This dynamic section tag identified runtime feature requirements. See Dynamic Section. This tag provided the feature flags DTF_1_PARINIT and DTF_1_CONVEXP. The DT_FEATURE_1 tag and the associated flags are no longer created by the link-editor, or processed by the runtime linker.

Solaris 10 5/08 Release

  • Global auditing can now be enabled by recording an auditor within an application together with the link-editor –z globalaudit option. See Recording Global Auditors.

  • Additional link-editor support interfaces, ld_open() and ld_open64() have been added. See Support Interface Functions.

Solaris 10 8/07 Release

  • Greater flexibility in executing an alternative link-editor is provided with the link-editor –z altexec64 option, and the LD_ALTEXEC environment variable.

  • Symbol definitions that are generated using mapfiles can now be associated to ELF sections. See SYMBOL_SCOPE / SYMBOL_VERSION Directives.

  • The link-editor and runtime linker provide for the creation of static TLS within shared objects. In addition, a backup TLS reservation is established to provide for limited use of static TLS within post-startup shared objects. See Program Startup.

Solaris 10 1/06 Release

  • Support for the x64 medium code model is provided. See Table 12–4, Table 12–8, and Table 12–12.

  • The command line arguments, environment variables, and auxiliary vector array of the process, can be obtained using the dlinfo (3C) flag RTLD_DI_ARGSINFO.

  • Greater flexibility in prohibiting direct binding from external references is provided with the link-editor –B nodirect option. See Chapter 6, Direct Bindings.

Solaris 10 Release