Linker and Libraries Guide

32-Bit 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. 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. In the latter case, the size of the generated object, not including the .bss, is restricted to 2 Gbytes.

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 relocatable object file it sees on the command-line 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.

The operations of the link-editors on 32-bit and 64-bit objects is identical. 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.