The linker invocation commands are:
gld960 { - | / } [-option]... [file]...
lnk960 { - | / } [-option]... [file]...
Each invocation option must be preceded by a - character. (On DOS, you can also use a / character.) Options are described below.
You can specify one or more input files when invoking the linker. These files can be linker directive files, object files, or libraries.
Choose an option from the list below, or scroll through this document to view all options.
A { CA | CF | HA | HD | HT | JA | JD | JF | KA | KB | RP | SA | SB }
(Architecture)
Use A to identify a member of the i960 processor family as the output target. The architecture argument is a two-letter string specifying the architecture as CA, CF, JA, JD, JF, HA, HD, HT, KA, KB, RP, SA, or SB.
If the linker is invoked as gld960 and no A option is given, the target processor is set from the linker directive OUTPUT_ARCH or, if that is not set, the environment variable G960ARCH.
If the linker is invoked as lnk960 and no A option is given, the target processor is set from the linker directive OUTPUT_ARCH or, if that is not set, from the environmental variable I960ARCH. If no target processor is specified, the linker produces KB processor output.
Bsection-name section-start-address (Section start address)
Use B to specify a starting address for an output section. This option overrides start addresses given either in SECTIONS directives or with the T option.
For the section-start-address, use either a constant in octal, decimal, or hexadecimal notation or a symbolic expression. To distinguish a constant section-start-address from a symbol name, begin the address with a numeric digit such as 0.
Use C to direct the linker to ignore any STARTUP directive found in linker directive files. The STARTUP file is the first object file encountered on the command line, or in a linker directive file.
Causes the linker to iteratively resolve circular references in libraries. It is best to construct your libraries without circular references. However, in some rare instances it is not possible or practical to do so. The c option allows you to cause the linker to resolve these references iteratively.
dc | dp (Define common symbol space)
The dc and dp options are equivalent; the multiple forms are available for backward compatibility. You can use this option to assign space to common symbols even when you also specify a relocatable output file with r. The linker directive file command FORCE_COMMON_ALLOCATION has the same effect as dc or dp.
defsym symbol=expression (Define symbol)
Use defsym to define an external absolute symbol on the linker invocation line. This invocation line definition overrides any library definition of the symbol and suppresses loading any library members otherwise needed to resolve references to the symbol.
The symbol argument can be any ASCII string. To access the symbol from C code, prepend the symbol string with an extra underscore character.
The expression defines the symbol value. When using other symbols in this expression, be sure to avoid circular definitions. When the expression contains white space or parentheses you must enclose the entire definition in quotes or somehow escape the expression through the command processor (shell). For example, the following defines a symbol named _dspace with the value 0x12340: defsym "_dspace=0x12340".
Use e to define an entry point other than the default for beginning execution of your program. The entry symbol name becomes the new entry point. By default, the linker defines the entry point as the symbol start. If start is not defined, it uses main. If main is not defined, it is defined as the first address in the .text section. If there is no .text section, the entry is set to 0.
Use Farg to specify the format for output object files.
Fbout produces a b.out format output file named b.out.
Fcoff produces a COFF output file named a.out.
Felf produces an ELF output file named e.out.
When you do not specify F, the linker uses the invocation name to determine the object-file format. For gld960 , the default is Fbout. For lnk960, the default is Fcoff.
Specifying Fbout as a lnk960 option is not supported.
For all formats, header, section and symbol information in input files can be either big-endian or little-endian. The target code in b.out format output is always little-endian (the b.out format does not support big-endian code regions). The target code in COFF and ELF files can be little-endian, big-endian. (You can use mixed-endian but it is officially not supported in the toolset.)
The linker outputs target code and data in the same byte order as its input object files. To link for a big-endian target, all input object files must be big- endian. You can create big-endian object files by compiling or assembling with the G option. The endianness of the output header, section and symbol information depends on the invocation name. When the linker is invoked as gld960, this information is little-endian. When the linker is invoked as lnk960, the information is host-endian.
Initializes the gaps within a section to value. Default is 0.
Informs gld960 that the target has big-endian memory regions. If the linker is invoked as gld960 and G is specified, the Fcoff or Felf option must also be used. If the linker is invoked as gld960, the linker's G option establishes search paths that point to big-endian libraries and directive files.
If the linker is invoked as lnk960, you must include the appropriate big-endian libraries and directive files manually.
g
The linker accepts and ignores the g option. This option is provided for compatibility with other tools.
Invokes the gcdm960 optimization decision maker. See the description of this option in your gcc960 or ic960 compiler driver documentation.
Sorts the common symbols in each file in the linkage, based on size.
Displays the linker help information and exits without further processing.
Removes unneeded COFF storage class tags from output symbol table.
Adds dir to the list of paths the linker searches for archive libraries. You can use this option any number of times on the invocation line. How L interacts with the default search path depends on the linker's invocation name. You can also add directories to the search path using the SEARCH_DIR command in a linker directive file. Such directories are appended to the search path after any directories you specify with L.
Specifies an abbreviation for one of the four standard library types (standard ANSI, math, accelerated floating-point and low-level). The linker combines the abbreviation for the type with the architecture option and big-endian and position-independent code and data options, if any, to generate a list of candidate library names.
A library is found by searching for the first library name in the candidate list in a series of directories and then the second library name in the series of directories, and so on until the library is found.
For each -labbr option, the linker generates the following list of candidate library names:
abbrqual.a
libabbrqual.a
abbrarchqual.a
libabbrarchqual.a
abbr is the argument of the -l option, one of: c, m, h, ll
qual is null unless big-endian, PIC or PID options are specified on the linker command line. Then, qual is one of: _b or b; _e or e; _p or p
arch is the architecture option specified by the linker command line.
The linker searches for each library name along a search path determined by the linker invocation. See Chapter 2 of your i960 Processor Software Utilities User's Guide for more information.
M (Multiple definition warning)
Specify M for the linker to issue a warning when multiple definitions of a symbol are found, even when the definitions are identical.
Note: This option is disabled. The linker emits multiple-definition warnings regardless of whether M is used.
Specify m to generate a linker map. By default, this option is sent to the standard output stream. See the N option on how to redirect this.
Use the n option to create an output file, regardless of whether or not errors occurred during the link. (This option may be removed without notice).
Specifies a filename for the map file. Requires the m option.
Ob | Os (Optimization inhibit)
Use these options to suppress optimization of CALLJ/CALLJX to BAL/BALX or to CALLS, respectively. Without such optimization, the instructions remain CALL or CALLX, and may be relocated incorrectly in the case of Os.
Use o to specify a name other than the default for the linker output file. When you do not specify o, the linker names b.out output b.out, COFF output a.out, and ELF output e.out. The o option overrides any OUTPUT linker directive file command.
P (Profiling)
Specify P when you are producing a relocatable executable (with r option) and also performing the first pass of a two-pass compilation. This option puts the profiling code in your linked output even when you also specify the r option for relocatable output.
pb | pc | pd (Position independence)
When the linker is invoked as lnk960 , pb or pd links with libraries built with position-independent data. Without these options, the linker uses libraries whose data is not position-independent. (The code of all default libraries is already position-independent.) These switches also cause the linker to issue warnings if any input files do not have the appropriate PIC, PID, or LINK_PID bits set in the file header.
q { o | n | b } (Search rules)
Use q to specify old (o), new (n) or both (b) search rules. This option requires the tools to have been installed in compatibility mode.
Use R to read symbol names and their addresses from the filename object file without relocating or including the filename object file in your linked output file. When you specify this option, your output file can refer symbolically to absolute locations of memory defined in other programs.
To generate relocatable linker output, specify r. You can use the resulting output file as input for a subsequent linker invocation.
Unless you also specify the P option, the linker does not include profiling startup code in the relocatable output.
Use S to omit debug information from the output file.
Use s to omit all symbol information from the output file.
T { bss | data | text } addr (Section start address)
Use T to specify a starting address other than the default for the .bss, .data, or .text section of the output file. The addr argument for each section must be a hexadecimal integer.
The T option continues to be supported for backwards compatibility, but B offers a more general capability.
Use T to specify a linker directive file located in the linker search path. If a linker directive file is given on the command line without the T option, only the current directory is searched.
t
Suppresses warnings of multiple symbol definitions, even if they differ in size. (This option is accepted but has no effect.)
Use u to enter symbol in the linker's symbol table as an undefined symbol. You can use this option one or more times on the invocation line.
The undefined symbol can cause the linker to pull in additional modules from libraries.
Displays the linker version number and continues processing.
Displays information about the actions of the linker.
Displays the linker version number and exits without further processing.
Suppresses all warnings except multiple symbol definition warnings.
Uses the X option to delete local symbols beginning with L or '.'. Use the x option to delete all local symbols.
Traces the symbol sym, indicating each object file in which sym appears, the symbol's type (absolute or relocatable): if it is relocatable, then the section it is in, and whether the file defines or references it. Multiple symbols can be traced with multiple y options. If sym came from a C program, you must precede it with an underscore.
Identifies the parent directory of the program database.
Tells the linker to mark the output file as created at UNIX time zero (4:00 p.m., December 31, 1969). You can use this option to suppress the COFF time stamp and make two linker output files identical.
Return
to the top of this page.