Directives Reference
7-58 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B
7.7.7 EXPORT or GLOBAL
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
EXPORT {symbol}{[WEAK]}
where:
symbol
is the symbol name to export. The symbol name is case-sensitive. If
symbol
is omitted, all symbols are exported.
[WEAK]
means that this instance of
symbol
should only be imported into other
sources if no other source exports an alternative instance. If
[WEAK]
is used
without
symbol
, all exported symbols are weak.
Usage
Use
EXPORT
to give code in other files access to symbols in the current file.
Use the
[WEAK]
attribute to inform the linker that a different instance of
symbol
takes
precedence over this one, if a different one is available from another source.
See also IMPORT on page 7-62.
Example
AREA Example,CODE,READONLY
EXPORT DoAdd ; Export the function name
; to be used by external
; modules.
DoAdd ADD r0,r0,r1