Linker and Libraries Guide

32- and 64-bit Environments

The link-editors operate on 32-bit objects, and on SPARCV9 systems are also capable of operating on 64-bit objects. In fact on SPARC systems the 64-bit link-editor (ld(1)) is capable of generating 32-bit objects and the 32-bit link-editor is capable of generating 64-bit objects (however, in the latter case, the size of the generated object, not including the .bss, is restricted to 2 gigabytes).

Typically, no command line option is required to distinguish a 32-bit or 64-bit link-edit. The link-editor uses the ELF class of the first input ELF object it sees to govern the mode in which it will operate. Specialized link-edits, such as linking solely from a mapfile or an archive library, are uninfluenced by their input files, and will default to a 32-bit mode. In these cases a 64-bit link-edit can be enforced with the -64 option. Intermixing of 32-bit and 64-bit objects is not permitted.

In general the operations of the link-editors on 32-bit and 64-bit objects is identical; however, this document typically uses 32-bit examples. Cases where 64-bit processing differs from the 32-bit processing are highlighted.

For more information regarding 64-bit applications refer to the Solaris 64-bit Developer's Guide.