Configuring the linker with zds, Using the linker with the command line – Zilog Z80380 User Manual
Page 55
UM004001-COR1103
3–5
Linking Files
Invoking the Linker
N
OTE
:
The user needs to include the C-run time initialization file that is appropriate for the compila-
tion model chosen in the project. See Table 3-1 for a list of initialization files that are included with
the C-Compiler. For more information on adding included files see Manually Configuring the Com-
piler on page 1-9
Configuring the Linker with ZDS
Perform the following steps to set the linker command file options in ZDS :
1. Open the project
2. Select Settings from the Project menu. The Settings Options dialog box appears.
3. Click the C-Compiler tab.
4. Select General from the Category pop-up list in the C-Compiler Settings dialog box. The
C-compiler General page appears.
5. Click the Set Default button.
6. Click Apply.
N
OTE
:
The linker’s settings can also be modified through the Linker Settings dialog box. Consult
ZDS’s on-line help for more information on configuring the linker.
U
SING
THE
LINKER
WITH
THE
COMMAND
LINE
Use the syntax below to invoke the linker on the command line :
zld -o
output name
-a
init-object-files
{
object files
}
c-comp-lib-file lib-files
map-file
linker-command-file
•
output-name is the .ld filename. For example if test.ld is the desired output file,
then the output name should be test.
•
init.-object-file is the C run time initialization file. The user can specify their own
initialization files to use. If the file is not in the current directory the path needs to be
included in the file name.
•
{object files} is the list of object files that are to be linked.
•
c-comp-lib-file is the C-compiler library files that need to be linked. See Table 3-1 for
a list of library files that are include with the C-compiler.
•
lib-files is the library files created by the user using the ZDS archiver (ZAR).
•
map-file is the map file’s name that is to be generated by the linker.