Ansi standard compliance, Freestanding implementation – Zilog ZUSBOPTS User Manual
Page 222
ANSI Standard Compliance
UM017105-0511
194
Zilog Developer Studio II – ZNEO™
User Manual
The list above comprises the linker symbol definitions described in Table 17. They allow
the compiler to know the bounds of the different memory areas that must be initialized in
different ways by the C start-up module.
"c:\sample\test"= \
C:\PROGRA~1\Zilog\ZD3E4C~1.0\lib\startupL.obj, \
.\foo.obj, \
C:\PROGRA~1\Zilog\ZD3E4C~1.0\lib\chelpLD.lib, \
C:\PROGRA~1\Zilog\ZD3E4C~1.0\lib\crtLD.lib, \
C:\PROGRA~1\Zilog\ZD3E4C~1.0\lib\fpLD.lib
This final command shows that, in this example, the linker output file is named
test.lod
. The source object file (
foo.obj
) is to be linked with the other modules that
are required to make a complete executable load file. In this case, those other modules are
the C start-up modules for the large model (
startupl.obj
), the C helper library for the
large model with debug (
chelpld.lib
), the C run-time library for the large model with
debug (
crtld.lib
), and the floating-point library for that same configuration
(
fpld.lib
).
An important point to understand in using the linker is that if you use the Zilog default
version of the C run-time library, the linker will link in only those functions that are actu-
ally called in your program. This is because the Zilog default library is organized with
only one function (or in a few cases, a few closely related functions) in each module.
Although the C run-time library contains a very large number of functions from the C
standard library, if your application only calls two of those functions, then only those two
are linked into your application (plus any functions that are called by those two functions
in turn). This means it is safe for you to simply link in a large library such as
chel-
pLD.lib
,
crtLD.lib
, and
fpLD.lib
as in this example. You do not have to worry
about any unnecessary code being linked in and do not have to do the extra work of pains-
takingly finding the unresolved symbols for yourself and linking only to those specific
functions. See
on page 67 for a further discussion of this area.
ANSI Standard Compliance
The Zilog ZNEO C-Compiler is a freestanding ANSI C compiler, complying with the
1989 ISO standard, which is also known as ANSI Standard X3.159-1989 with some devi-
ations, which are described in the
Freestanding Implementation
A freestanding implementation of the C language is a concept defined in the ANSI stan-
dard itself, to accommodate the needs of embedded applications that cannot be expected to
provide all of the services of the typical desktop execution environment (which is called a
hosted environment in the terms of the standard). In particular, it is presumed that there are
no file system and no operating system. The use of the standard term freestanding imple-