Sizeof() Operator; Location Counter (.) - Analog Devices VisualDSP++ 3.5 Manual

Linker and utilities manual for 16-bit processors
Hide thumbs Also See for VisualDSP++ 3.5:
Table of Contents

Advertisement

SIZEOF() Operator

Syntax:
SIZEOF(section_name)
This operator returns the size (in bytes) of the named output section. Use
this operator when a section's size is required to move the current location
counter to an appropriate memory location.
Example
The following LDF fragment defines the
size of the
data1
data1
{
INPUT_SECTIONS( $OBJECTS(data1) $LIBRARIES(data1))
_sizeofdata1 = SIZEOF(data1);
} > MEM_DATA1

Location Counter (.)

The linker treats a "." (period surrounded by spaces) as the symbol for the
current location counter. The location counter is a pointer to the memory
location at the end of the output section. Because the period refers to a
location in an output section, this operator may appear only within an
output section in a
Observe these rules:
• Use a period anywhere a symbol is allowed in an expression.
• Assigning a value to the period operator moves the location counter
and leaves voids or gaps in memory.
• The location counter may not be decremented.
VisualDSP++ 3.5 Linker and Utilities Manual
for 16-Bit Processors
section.
command.
SECTIONS{}
Linker Description File
constant to the
_sizeofdata1
3-19

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VisualDSP++ 3.5 and is the answer not in the manual?

Questions and answers

Related Products for Analog Devices VisualDSP++ 3.5

Table of Contents