ENTRY directive declares an entry point to a program.
A program must have an entry point. You can specify an entry point in the following ways:
ENTRYdirective in assembly language source code.
main()function in C or C++ source code.
armlink --entrycommand-line option.
You can declare more than one entry point in a program, although
a source file cannot contain more than one
For example, a program could contain multiple assembly language
source files, each with an
Or it could contain a C or C++ file with a
and one or more assembly source files with an
If the program contains multiple entry points, then you must select one of them. You do this by
exporting the symbol for the
ENTRY directive that you want to use as the
entry point, then using the
armlink --entry option to
select the exported symbol.
AREA ARMex, CODE, READONLY ENTRY ; Entry point for the application. EXPORT ep1 ; Export the symbol so the linker can find it ep1 ; in the object file. ; code END
When you invoke armlink, if other entry points are declared in the program,
then you must specify
--entry=ep1, to select