.assert. freescale SC100 Linker
إعلان
إعلان
Freescale Semiconductor, Inc.
SCLinker.book Page 31 Thursday, September 23, 2004 10:55 AM
Linker Command File
Linker Directives
Parameter
n
Byte boundary. Must be a power of 2.
Remarks
If the sections within a segment also have their own alignment, the linker may align the segment to a slightly higher address than that specified by the .align directive.
Example
.org _CodeStart
.align 16
.segment .libtext, “.libtext"
.assert
Evaluates the specified expression. If the expression is not true (evaluates to 0), it is a link error.
.assert expression
Parameter
expression
Expression to be evaluated.
Remarks
This directive is useful for restricting or checking the maximum size of a segment.
For example, the .assert directive in the following example specifies that the
INTVEC segment (the interrupt vector table) must be exactly 512 bytes. If it is not, the linker reports an error.
Example
.org 0
.segment INTVEC, “.intvec"
.assert @segsize(INTVEC) == 512
31 SC100 Linker User Guide
For More Information: www.freescale.com
تنزيل
إعلان