
Motorola DSP Object File Format (COFF)
Object File Data Expression Format
MOTOROLA
DSP ASSEMBLER REFERENCE MANUAL
For More Information On This Product,
Go to: www.freescale.com
E-31
cards the reference symbol. When the relocation entries are processed, the resolved
symbol value is used to modify the raw data indicated by the relocation entry at
r_vaddr
.
In Motorola DSP COFF
r_symndx
is an offset into the string table which points to a relo-
cation expression. The Linker interprets this expression and updates the entire word at
r_vaddr
with the result of the expression evaluation. The relocation type is always zero.
See section E.5, Object File Data Expression Format for more information on relocation
expressions.
E.4.5 Block Data Sections
Generic COFF does not make allowance for a block data section. A block data section
results from use of the Assembler
BSC
directive, where a large block of memory is initial-
ized with a single value. Block data sections are handled in Motorola DSP COFF by mak-
ing special use of the section
s_vaddr
field and adding an informative flag.
In most cases the section virtual address is the same as the physical address. However,
for block data sections in Motorola DSP object files the virtual address field holds the re-
peat count for the single raw data value associated with the section. For example, if the
assembly language source file included a directive of the form BSC $400,$FFFF the
s_vaddr
field would contain the value $400, the
s_size
field would be 1 (or 2 if in L mem-
ory), and the single raw data word associated with the section would be $FFFF. In addi-
tion, the STYP_BLOCK flag is set in the section
s_flags
field.
E.4.6 Other Extensions
If the object file is relocatable there are extra structures which the Assembler and Linker
generate to support special constructs such as logical sections, buffers, and overlays. The
optional link file header contains information which the Linker requires; it is described in
section E.3.2. Every symbol table entry for a section in a relocatable file has an extra aux-
iliary entry described in section E.3.4.6.2.
One special DSP COFF structure not documented elsewhere is the comment symbol. A
comment symbol table entry is emitted either indirectly via the Assembler
IDENT
directive
or directly with the
COBJ
directive (see Chapter 6). A comment symbol table entry may
be identified by a symbol name of
.cmt
and a type and storage class of zero. The value
field of a comment symbol holds the offset into the string table of the comment text. The
section number for a comment symbol produced with the
IDENT
directive is always -1.
Comment symbols generated with the
COBJ
directive have the section number of the
section where the
COBJ
directive appears in the source file. Comment symbols have no
auxiliary entry.
E.5
OBJECT FILE DATA EXPRESSION FORMAT
Object file data expressions are used in data relocation records to represent values to be
loaded into memory. An expression is a combination of symbols, constants, operators,
F
Freescale Semiconductor, Inc.
n
.