Linking Tools and Options

This topic describes how to use the Intel® linking tools, xild (Linux* OS and Mac OS* X) or xilink (Windows* OS).

The Intel linking tools behave differently on different platforms. The following sections summarizes the primary differences between the linking behaviors.

Linux OS and Mac OS X Linking Behavior Summary

The linking tool invokes the compiler to perform IPO if objects containing IR (intermediate representation) are found. (These are mock objects.) It invokes GNU ld to link the application.

The command-line syntax for xild is the same as that of the GNU linker:

xild [<options>] <normal command-line>

where:

  • [<options>]: (optional) one or more options supported only by xild.

  • <normal command-line>: linker command line containing a set of valid arguments for ld.

To create app using IPO, use the option -ofilename as shown in the following example:

xild -qipo-fas -oapp a.o b.o c.o

The linking tool calls the compiler to perform IPO for objects containing IR and creates a new list of object(s) to be linked. The linker then calls ld to link the object files that are specified in the new list and produce the application with the name specified by the -o option. The linker supports the -ipo[n] and -ipo-separate options.

Windows OS Linking Behavior Summary

The linking tool invokes the Intel compiler to perform multi-file IPO if objects containing IR (intermediate representation) is found. These are mock objects. It invokes Microsoft* link.exe to link the application.

The command-line syntax for the Intel® linker is the same as that of the Microsoft linker:

xilink [<options>] <normal command-line>

where:

  • [<options>]: (optional) one or more options supported only by xilink.

  • <normal command-line>: linker command line containing a set of valid arguments for the Microsoft linker.

To place the multifile IPO executable in ipo_file.exe, use the linker option /out:filename; for example:

xilink -qipo-fas /out:ipo_file.exe a.obj b.obj c.obj

The linker calls the compiler to perform IPO for objects containing IR and creates a new list of object(s) to be linked. The linker calls Microsoft link.exe to link the object files that are specified in the new list and produce the application with the name specified by the /out:filename linker option.

Using the Linking Tools

You must use the Intel linking tools to link your application if the following conditions apply:

The following table lists the available, case-insensitive options supported by the Intel linking tools and briefly describes the behavior of each option:

Linking Tools Option

Description

-qdiag-type=diag-list

Controls the display of diagnostic information.

The type is an action to perform on diagnostics. Possible values are:

enable

Enables a diagnostic message or a group of messages.

disable

Disables a diagnostic message or a group of messages.

The diag-list is a diagnostic group or ID value. Possible values are:

thread

Specifies diagnostic messages that help in thread-enabling a program.

vec

Specifies diagnostic messages issued by the vectorizer.

par

Specifies diagnostic messages issued by the auto-parallelizer (parallel optimizer).

openmp

Specifies diagnostic messages issued by the OpenMP* parallelizer.

warn

Specifies diagnostic messages that have a "warning" severity level.

error

Specifies diagnostic messages that have an "error" severity level.

remark

Specifies diagnostic messages that are remarks or comments.

cpu-dispatch

Specifies the CPU dispatch remarks for diagnostic messages. These remarks are enabled by default.

id[,id,...]

Specifies the ID number of one or more messages. If you specify more than one message number, they must be separated by commas. There can be no intervening white space between each "id".

tag[,tag,...]

Specifies the mnemonic name of one or more messages. If you specify more than one mnemonic name, they must be separated by commas. There can be no intervening white space between each "tag".

The diagnostic messages generated can be affected by certain options, such as /arch or /Qx (Windows) or -m or -x (Linux and Mac OS X).

-qhelp

Lists the available linking tool options. Same as passing no option.

-qnoipo

Disables multi-file IPO compilation.

-qipo-fa [{filename | dir}]

Produces an assembly listing for the multi-file IPO compilation. You may specify an optional name for the listing file, or a directory (with the backslash) in which to place the file.

The default listing name depends on the platform:

  • Linux OS and Mac OS X: ipo_out.s

  • Windows OS: ipo_out.asm

If the Intel linking tool invocation results in multi-object compilation, either because the application is big or because the user explicitly instructed the compiler to generate multiple objects, the first .s (Linux OS and Mac OS X) or .asm (Windows OS) file takes its name from the -qipo-fa option.

The compiler derives the names of subsequent .s (Linux OS and Mac OS X) or .asm (Windows OS) files by appending an incrementing number to the name, for example, foo.asm and foo1.asm for ipo_fafoo.asm. The same is true for the -qipo-fo option (listed below).

-qipo-fo [{filename | dir}]

Produces an object file for the multi-file IPO compilation. You may specify an optional name for the object file, or a directory (with the backslash) in which to place the file. The default object file name depends on the platform:

  • Linux OS and Mac OS X: ipo_out.o

  • Windows OS: ipo_out.obj

-qipo-fas

Adds source lines to the assembly listing.

-qipo-fac

Adds code bytes to the assembly listing.

-qipo-facs

Adds code bytes and source lines to the assembly listing.

-qomit-il

Omits il-data from relocatable objects generated when using "xild -r". This prevents these relocatable objects from being included in any further IPO compilations, which may affect further optimization. It reduces the size of the generated object file.

-quseenv

Disables any overrides of existing PATH, LIB, and INCLUDE variables.

-lib

Invokes the librarian instead of the linker.

-libtool

Mac OS X: Invokes libtool to create a library instead of ld.

-qv

Displays version information.

Note that in the above options, you can specify an underscore (_) instead of a dash (-).



Submit feedback on this help topic

Copyright © 1996-2010, Intel Corporation. All rights reserved.