Invoking the linker, Linker commands, Invoking the linker linker commands – Zilog ZUSBOPTS User Manual
Page 288: P. see the, Linker, Commands

Invoking the Linker
UM017105-0511
260
Zilog Developer Studio II – ZNEO™
User Manual
Segments.
Each address space consists of various segments. Segments are named logical
partitions of data or code that form a continuous block of memory. Segments with the
same name residing in different modules are concatenated together at link time. Segments
are assigned to an address space and can be relocatable or absolute. Relocatable segments
can be randomly allocated by the linker; absolute segments are assigned a physical address
within its address space. See
– see page 213 for more information about using
predefined segments, defining new segments, and attaching code and data to segments.
The linker performs the following functions:
•
Reads in relocatable object modules and library files and linker commands.
•
Resolves external references.
•
Assigns absolute addresses to relocatable segments of each address space and group.
•
Generates a single executable module to download into the target system.
•
Generates a map file.
Invoking the Linker
The linker is automatically invoked when your project is open and you click the Build but-
ton or
Rebuild All
button on the Build toolbar (see the
The linker then links the corresponding object modules of the various source files in your
project and any additional object/library modules specified in the
Objects and Libraries
page in the
Project Settings
).The linker uses the linker
command file to control how these object modules and libraries are linked. The linker
command file is automatically generated by ZDS II if the Always Generate from Settings
button is selected (see the
section on page 61). You can
add additional linker commands with the
Additional Linker Directives
dialog box (dis-
cussed on
). If you want to override the automatically generated linker command
file, select the
Use Existing
The linker can also be invoked from the DOS command line or through the ZDS II Com-
mand Processor. For more information about invoking the linker from the DOS command
line, see
Running ZDS II from the Command Line
– see page 349. To invoke the linker
through the ZDS II Command Processor, see
Linker Commands
This section describes the commands of a linker command file:
•