The following switches are available with the
Display Copyright and version, then exit disregarding all other options.
--version was not used, display usage, then exit disregarding
all other options.
On some targets, the command line length is limited, and
will generate a separate file for the linker if the list of object files
is too long.
-f switch forces this file
to be generated even if
the limit is not exceeded. This is useful in some cases to deal with
special situations where the command line length is exceeded.
The option to include debugging information causes the Ada bind file (in
b~mainprog.adb) to be compiled with
In addition, the binder does not delete the
-g, the binder removes these files by default.
Do not compile the file generated by the binder. This may be used when a link is rerun with different options, but there is no need to recompile the binder file.
Verbose mode. Causes additional information to be output, including a full list of the included object files. This switch option is most useful when you want to see what set of object files are being used in the link step.
Very verbose mode. Requests that the compiler operate in verbose mode when it compiles the binder file, and that the system linker run in verbose mode.
exec-name specifies an alternate name for the generated
executable program. If this switch is omitted, the executable has the same
name as the main unit. For example,
gnatlink try.ali creates
an executable called
Load compiler executables (for example,
gnat1, the Ada compiler)
dir instead of the default location. Only use this switch
when multiple versions of the GNAT compiler are available.
Directory Options section in The_GNU_Compiler_Collection
for further details. You would normally use the
-V switch instead.
When linking an executable, create a map file. The name of the map file has the same name as the executable with extension ".map".
When linking an executable, create a map file. The name of the map file is
Program used for compiling the binder file. The default is
gcc. You need to use quotes around
compiler_name contains spaces or other separator characters.
As an example
--GCC="foo -x -y" will instruct
foo -x -y as your compiler. Note that switch
-c is always
inserted after your command name. Thus in the above example the compiler
command that will be used by
gnatlink will be
foo -c -x -y.
A limitation of this syntax is that the name and path name of the executable
itself must not include any embedded spaces. If the compiler executable is
different from the default one (gcc or <prefix>-gcc), then the back-end
switches in the ALI file are not used to compile the binder generated source.
For example, this is the case with
--GCC="foo -x -y". But the back end
switches will be used for
--GCC="gcc -gnatv". If several
--GCC=compiler_name are used, only the last
is taken into account. However, all the additional switches are also taken
into account. Thus,
--GCC="foo -x -y" --GCC="bar -z -t" is equivalent to
--GCC="bar -x -y -z -t".
name is the name of the linker to be invoked. This is especially
useful in mixed language programs since languages such as C++ require
their own linker to be used. When this switch is omitted, the default
name for the linker is
gcc. When this switch is used, the
specified linker is called instead of
gcc with exactly the same
parameters that would have been passed to
gcc so if the desired
linker requires different parameters it is necessary to use a wrapper
script that massages the parameters before invoking the real linker. It
may be useful to control the exact invocation by using the verbose