ILINK64.EXE, the 64-bit Incremental Linker
Go Up to Command-Line Utilities Index
ILINK64.EXE is the command-line interface of ILINK64, the C++ linker for 64-bit Windows.
Contents
Command-Line Syntax
ILINK64 <objfiles>, <exefile>, <mapfile>, <libfiles>, <deffile>, <resfiles>
Command-Line Elements
The 64-bit linker can also use a configuration file called ILINK64.CFG for options that you would typically type at the command line.
Element | Description |
---|---|
|
Linker options that control how the linker works. For example, options specify whether to produce an .EXE or .DLL file. Linker options must be preceded by either a slash ( |
|
An initialization module for executables or DLLs that arranges the order of the various segments of the program. Failure to link in the correct initialization module usually results in a long list of error messages telling you that certain identifiers are unresolved, or that no stack has been created. |
|
The object files ( |
|
The name you want to be given to the executable file (.EXE or .DLL). If you do not specify an executable file name, ILINK64 derives the name of the executable by appending .EXE or .DLL to the first object file name listed. (The linker assumes or appends an .EXE extension for executable files if no extension is present. It also appends a .DLL extension for dynamic link libraries if no extension is present.) |
|
The name you want to be given to the map file. If you do not specify a name, the map file name is the same as the .EXE file (but with the .MAP extension). (The linker appends a .MAP extension if you do not specify an extension.) |
|
The library files (
|
|
The module definition file for a Windows executable. If you do not specify a module definition (.DEF) file and you have used the |
|
A list of .RES files (compiled resource files) to bind to the executable. (The linker appends a .RES extension if no extension is present.) |
Command-Line Help
To display the command-line help for ILINK64, enter:
ilink64
The following screen appears:
Turbo Incremental Link 6.40 Copyright (c) 1997-2012 Embarcadero Technologies, Inc. Syntax: ILINK objfiles, exefile, mapfile, libfiles, deffile, resfiles @xxxx indicates use response file xxxx General Options: -Af:nnnn Specify file alignment -C Clear state before linking -Ao:nnnn Specify object alignment -wxxx Warning control -ax Specify application type -Enn Max number of errors -b:xxxx Specify image base addr -r Verbose linking -Txx Specify output file type -q Suppress banner -H:xxxx Specify heap reserve size -c Case sensitive linking -Hc:xxxx Specify heap commit size -v Full debug information -S:xxxx Specify stack reserve size -Gn No state files -Sc:xxxx Specify stack commit size -Gi Generate import library -Vd.d Specify Windows version -GD Generate .DRC file -Dstring Set image description Map File Control: -Vd.d Specify subsystem version -M Map with mangled names -Ud.d Specify image user version -m Map file with publics -GC Specify image comment str -s Detailed segment map -GF Set image flags -x No map -Gl Static package Paths: -Gpd Design time only package -I Intermediate output dir -Gpr Runtime only package -L Specify library search paths -GS Set section flags -j Specify object search paths -Gt Fast TLS Image Control: -Gz Do image checksum -d Delay load a .DLL -Rr Replace resources
Command-Line Options
ILINK64.EXE command-line options are case-sensitive.
ILINK64.EXE supports the command-line options listed in the following table:
Note:
ilink64
command line options can also be written with a preceding-
, instead of/
. (For example, the/Tpe
option can be also written as-Tpe
.)
Linker Options
Option | Description |
---|---|
|
Uses the response file |
|
Specifies file alignment; set |
|
Specifies object alignment; set |
|
Builds a 64-bit Windows application. |
|
Builds a 64-bit Windows device driver. |
|
Builds a 64-bit Windows console application. |
|
Specifies the image base address and removes the relocation table. |
|
Specifies the image base address, and preserves DLL relocation table. Successive objects are aligned on 64K linear address boundaries. Improves load-time and run-time performance.
Recommended for producing DLLs. |
|
Refreshes the linker state files. Erases all linker state files before each link; then recreates the files and continues with the link. |
|
Treats case as significant in public and external symbols. |
|
Delay-loads a DLL. The specified DLL is not loaded or initialized until an entry point in the DLL is actually called. |
|
Saves the specified description in the PE image. |
|
Specifies the max. number of errors. |
|
Inserts a comment string into the image directly after the object table in the PE file header. You can specify more than one string. |
|
Generates a Delphi-compatible RC file (DRC file). |
|
Sets image flags. The xxxx flags are:
|
|
Keeps output files on error. |
|
Generates a .LIB file. |
|
Generates design-time-only package. Default is: the package works at both design time and run time. |
|
Generates run-time-only package. Default is: the package works at both design time and run time. |
|
Don't generate state files (disable incremental linking). Subsequent links will take just as long as the first one. Default is Off. |
|
Set section flags. Adds the specified flags to the existing flags for a given section, but cannot remove default flags from a section. Section flags are: Example -Gs:.rsrc=W This switch makes the RSRC section writable. |
|
Calculate checksum of target and insert result in PE header. Used for NT Kernel mode drivers and system DLLs. |
|
Specifies application heap reserve size in hex or decimal. Minimum value is 0. This switch overrides the HEAPSIZE setting in a module definition file. |
|
Specifies application heap commit size. |
|
Specifies the directory for intermediate output files. Directs linker state files, but the map debug file and debug symbol files are saved in the same directory as the output image, unless otherwise specified for the map debug file. |
|
Specifies object search paths. Example ILINK64 /jc:\myobjs;.\objs splash ^ .\common\logo,,,utils logolib This command directs the linker to first search the current directory for SPLASH.OBJ. If the file is not found in the current directory, the linker then searches the C:\MYOBJS directory, and then the .\OBJs directory. However, the linker does not use the object search paths to find the file LOGO.OBJ because an explicit path was given for this file. |
|
Specifies the library search path to use if no explicit path is given for the LIB file and the linker cannot find the LIB file in the current directory. ILINK64 /Lc:\mylibs;.\libs splash ^ .\common\logo,,,utils logolib Directs the linker to first search the current directory for SPLASH.LIB. If the file is not found in the current directory, the linker then searches the C:\MYLIBS directory, and then the .\LIBs directory. However, the linker does not use the library search paths to find the file LOGO.LIB because an explicit path was given for this file. |
|
Prints the mangled C++ identifiers in the map file, not the full name. |
|
The segment listing has a line for each segment, showing the segment starting address, segment length, segment name, and the segment class. The public symbols are broken down into two lists, the first showing the symbols sorted alphabetically, the second showing the symbols in increasing address order. Symbols with absolute addresses are tagged |
|
Suppresses command-line banner. |
|
Verbose linking. Default is Off. |
|
Replaces resources. |
|
Specifies application stack reserve size. |
|
Specifies application stack commit size. |
|
Produces a detailed map file of segments by adding details such as group and module information to the default map file produced by the linker. |
|
Targets a 64-bit Windows DLL file. |
|
Targets a 64-bit Windows EXE file. |
|
Generates a package. |
|
Displays time spent on link. |
|
Generates a debug symbol file. |
|
Turns all warnings on. |
|
Disables the warning: |
|
Disables the warning: |
|
Disables the warning: |
|
Enables the warning: |
|
Disables the warning: |
|
Enables the warning: |
|
Disables the warning: |
|
Disables the warning: |
|
Disables the warning: |
|
Suppresses creation of a map debug file. |
|
Default map file of segments (no linker switch). By default, the linker generates a map file containing general segment information that includes:
|
Handling Out of Memory Errors from ILINK64
The IDE simply displays the message Fatal: Out of Memory, but ILINK64 emits more information about each heap and how much memory was used.
For example:
Turbo Incremental Link64 6.40 Copyright (c) 1997-2012 Embarcadero Technologies,
Inc.
Overrun on linker heap: info
Linker Heaps
------------
info 0x12271000 0x12000000
code 0x0487d000 0x08000000
rodata 0x00159000 0x06000000
data 0x029bb000 0x08000000
bss 0x08000000 0x08000000
dwarf_aranges 0x00010000 0x00200000
dwarf_macinfo 0x00010000 0x00200000
dwarf_pubtypes 0x00275000 0x02000000
dwarf_info 0x04e57000 0x06000000
dwarf_abbrev 0x00040000 0x00200000
dwarf_line 0x0124d000 0x02000000
dwarf_str 0x036e0000 0x06000000
dwarf_loc 0x00070000 0x02000000
dwarf_ranges 0x00275000 0x02000000
Fatal: Out of memory
You can use the -GH<heapname>=size
to allocate larger heap or heaps.
For example, to link the release version of the DLL OWLNext library, internal C++Builder developers use -GHinfo=0x12000000
.