Compiler
Operation
-
Linking/Archiving
Compiler
Output
• In the ROM model
(-c
option),
the linker defines the symbol
cinit
as
the starting address
of
the .cinit section. The C
boot
routine uses this
symbol
as
the starting
point
for
autoinitialization.
• In the
RAM
model
(-cr
option):
The linker sets the symbol
cinit
to
-1. This indicates
that
the
initialization tables are
not
in memory, so no initialization
is
per-
formed at run time.
The
STYP-COPY
flag
(010h)
is set in the .cinit section header.
STYP-COPY
is
the special attribute that tells the loader
to
perform
autoinitialization directly and
not
to
load the .cinit section
into
memory. The linker does
not
allocate space in memory for the .cinit
section.
3.6
Archiving
a C
Program
3-16
An archive file
(or
library)
is
a partitioned file that contains complete files
as
members. The
TMS34010
archiver
is
a software
utility
that
allows you
to
collect a
group
of
files together into a single archive file. The archiver also
allows
you
to
manipulate a library
by
adding members
to
it
or
by
extracting,
deleting, or replacing members. The
TMS34010
Assembly Language Tools
User's Guide contains complete instructions for using the archiver.
After compiling and assembling multiple files, you can use the archiver
to
collect the object files into a library. You can specify an archive file
as
linker
input. The linker
is
able
to
discern
which
files in a library resolve external ref-
erences, and
it
links in
only
those library members that it needs. This
is
useful
for creating a library
of
related functions; the linker links in
only
the functions
that a program
calls. The library
rts.
lib
is
an
example
of
an
object library.
You can also use the archiver
to
collect C source programs into a library. The
C compiler cannot choose individual files from a library; you must extract them
before
compiling
them. However, this can be useful
for
managing files and
for
transferring source files between systems. The library
rts.
src
is
an
ex-
ample
of
an
archive file that contains source files.
For more information about the archiver, see the
TMS34010
Assembly
Lan-
guage Tools User's Guide.