You copied the Doc URL to your clipboard.

About specifying an initial entry point

You must specify at least one initial entry point for a program otherwise the linker produces a warning. Not every source file has to have an entry point. Multiple entry points in a single source file are not permitted.

For embedded applications with ROM at zero use --entry 0x0, or optionally 0xFFFF0000 for CPUs that are using high vectors.

The initial entry point must meet the following conditions:

  • the image entry point must always lie within an execution region

  • the execution region must not overlay another execution region, and must be a root execution region (the load address is the same as the execution address).

If you do not use the --entry option to specify the initial entry point then:

  • if the input objects contain only one entry point set by the ENTRY directive, the linker uses that entry point as the initial entry point for the image

  • the linker generates an image that does not contain an initial entry point when either:

    • more than one entry point has been specified by using the ENTRY directive

    • no entry point has been specified by using the ENTRY directive.

See also


Linker Reference:

Assembler Reference: