5.8.34. EXPORT or GLOBAL directive

The EXPORT directive declares a symbol that can be used by the linker to resolve symbol references in separate object and library files. GLOBAL is a synonym for EXPORT.

Syntax

The syntax of EXPORT is:

EXPORT symbol {[qualifier{,qualifier}{,qualifier}]}

where:

symbol

is the symbol name to export. The symbol name iscase-sensitive.

qualifier

can be any of:

FPREGARGS

meaning that symbol refers to a function that expects floating-point arguments to be passed in floating-point registers.

DATA

meaning that symbol refers to a data location rather than a function or a procedure entry point.

LEAF

denotes that the exported function is a leaf function that calls no other functions. This qualifier is obsolete.

Usage

Use EXPORT to allow code in other files to refer to symbols in the current file.

Use the DATA attribute to inform the linker that symbol should not be the target of branches.

See also IMPORT or EXTERN directive.

Example

		AREA		Example,CODE,READONLY
		EXPORT 		DoAdd				; Export the function name
								; to be used by external
								; modules.
DoAdd		ADD		r0,r0,r1
Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0041C
Non-Confidential