Pages

Friday, December 30, 2005

Solaris: Improve 64-bit link time w/ LD_NOEXEC_64

Linking 64-bit applications take considerably more time than linking 32-bit applications. It was reported that some of the real world ISV {64-bit} applications are nearly 4 to 6 times slower in linking phase, compared to 32-bit linking.

Remedy:
64-bit link time performance can be improved a bit, by setting the environment variable LD_NOEXEC_64 to any non-zero value. If the link process doesn't need more than 4G virtual address limit of the 32-bit mode, LD_NOEXEC_64 env. variable suppresses the automatic execution of the 64-bit link-editor (ld). Note that in 64-bit mode, the linker has to deal with pointers that take twice as much room as their 32-bit counterparts; hence the memory consumption and the link time will be enormously high {compared to 32-bit linking}.

From the man page of ld(1):
...
LD_NOEXEC_64

Suppresses the automatic execution of the 64-bit link-editor. By default, the link-editor executes the 64-bit version when the ELF class of the first input relocatable file identifies a 64-bit object. The 64–bit image that a 32–bit link-editor can create, has some limitations. However, some link-edits might find the use of the 32–bit link-editor faster.
...

To suppress 64-bit linker:
        % setenv LD_NOEXEC_64 1
        % make or any custom script for linking
________________
Technorati tag: | |

No comments:

Post a Comment