Linker and Libraries Guide

The 32–bit link-editor and 64–bit link-editor

The link-editor is provided as a 32–bit application and a 64–bit application. Each link-editor can operate on 32–bit objects and 64–bit objects. However, a link-edit can not contain a mix of 32–bit objects and 64–bit objects. Although a 32–bit link-editor can generate a 64–bit object, the size of the generated object, not including the .bss, is restricted to 2 Gbytes.

By default, the compiler drivers execute the 32–bit link-editor. This link-editor inspects the command line to determine whether the 64–bit link-editor should be executed to complete the link-edit.

Typically, no command line option is required to distinguish a 32–bit link-edit or 64–bit link-edit. The link-editor uses the ELF class of the first relocatable object on the command line to govern the mode in which to operate. Specialized link-edits, such as linking solely from a mapfile or an archive library, are uninfluenced by the command line object. These link-edits default to a 32–bit mode, and require a command line option to instigate a 64–bit link-edit.

The 64–bit link-editor is executed under one of the following conditions.

The creation of very large 32–bit objects can exhaust the virtual memory that is available to the 32–bit link-editor. The -z altexec64 option can be used to force the use of the associated 64–bit link-editor. The 64–bit link-editor provides a larger virtual address space for building 32–bit objects.

Note –

The LD_ALTEXEC environment variable can also be used to specify an alternative link-editor.