Linker command line example, Linker symbols, Able – Zilog Z80380 User Manual
Page 56: Inker, Symbols

Linker symbols
Linking Files
3–6
UM004001-COR1103
•
linker-command-file is the command file to be linked by the linker. Sample command
files are provided in the lib directory. See Table 3-1 for a list of command files that are
include with the C-compiler.
Linker Command Line example
The following example shows how to invoke the linker using the DOS command line.
zld -otest -A lib-path\z380boot.o test.o lib-path\libc.lib
lib-path\z380.link -mtest.map
This example generates a test.ld, test.hex, test.dat, test.sym and
test.map
as output. The lib-path is the (c-compiler installation path)\lib, and test.o
is the object file corresponding to the C file created after compiling and assembling.
For more information on the linker command line see Linker Command Line on page 3-10.
LINKER SYMBOLS
The linker command file defines the symbols that are used by the C run-time initialization
file to initialize the stack pointer, register pointer and clear the BSS section. Table 3-2 shows
the symbols that are used by the linker.
T
ABLE
3-2. L
INKER
SYMBOLS
Symbol
Description
BSS_BASE
Base of .BSS section
BSS_LENGTH
Length of .BSS section
TOS
Top of stack