beautypg.com

Invoking the linker, Linker commands, Invoking the linker linker commands – Zilog ZUSBOPTS User Manual

Page 288: P. see the, Linker, Commands

background image

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

Segments

– 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

Build Toolbar

section on page 18).

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

dialog box (discussed on

page 64

).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

Always Generate from Settings

section on page 61). You can

add additional linker commands with the

Additional Linker Directives

dialog box (dis-

cussed on

page 62

). If you want to override the automatically generated linker command

file, select the

Use Existing

button (see the

Use Existing

section on page 63).

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

Using the Command Processor

– see

page 359.

Linker Commands

This section describes the commands of a linker command file:

=

– see page 262

This manual is related to the following products: