This topic describes how to use the Intel® linker, xild (Linux*) or xilink (Windows*), instead of the method specified in Command Line for Creating IPO Executable. The Intel® linker behaves differently on different platforms. The following table summarizes the primary differences:
Linux* Behavior Summary |
---|
Invokes the compiler to perform IPO if objects containing IR are found. Invokes GCC ld to link the application. The command-line syntax for xild is the same as that of the GCC linker: xild [<options>] <LINK_commandline> where:
To create app using IPO, use the option -ofile as shown in the following example: xild -oapp a.o b.o c.o 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 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, -ipoN, and -ipo-separate options. |
Windows* Behavior Summary |
Invokes the Intel compiler to perform multifile IPO if objects containing IR are found. 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>] <LINK_commandline>
To place the multifile IPO executable in ipo_file.exe, use the linker option /out:file; for example: xilink /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:file option. |
You must use the Intel® linker to link your application if the following conditions apply:
Your source files were compiled with multifile IPO enabled. Multifile IPO is enabled by specifying the -ipo (Linux) or /Qipo (Windows) command-line option
You normally would invoke either the GCC linker (ld) or the Microsoft linker (link.exe) to link your application.
Use these additional options supported by the Intel® linker to examine the results of multifile IPO:
Windows |
Linux |
Option Description |
---|---|---|
/qipo_fa[{file|dir/}] |
-qipo_fa[file.s] |
Produces assembly listing for the multifile 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 is depends on the platform:
|
/qipo_fo[{file|dir/}] |
-qipo_fo[file.o] |
Produces object file for the multifile 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 is depends on the platform:
|
/qipo_fas |
No equivalent |
Add source lines to assembly listing. |
/qipo_fac |
-ipo-fcode-asm |
Adds code bytes to the assembly listing. |
/qipo_facs |
No equivalent |
Add code bytes and source lines to assembly listing. |
No equivalent |
-ipo-fsource-asm |
Adds high-level source code to the assembly listing. |
/qv |
No equivalent |
Display version information. |
No equivalent |
-ipo-fverbose-asm, |
Enables and disables, respectively, inserting comments containing version and options used in the assembly listing. |
If the Intel® linker invocation leads to an IPO multi-object compilation (either because the application is big, or because the user explicitly asked for multiple objects), the first .s (Linux) or .asm (Windows) file takes its name from the -qipo_fa (Linux) or /qipo_fa (Windows) option.
The compiler derives the names of subsequent .s (Linux) or .asm (Windows) files by appending a number to the name, for example, foo.asm and foo1.asm for ipo_fafoo.asm. The same is true for the -qipo_fo (Linux) or /qipo_fo (Windows) option.