You copied the Doc URL to your clipboard.

--entry=location

This option specifies the unique initial entry point of the image.

Syntax

--entry=location

Where location is one of the following:

entry_address

A numerical value, for example: --entry=0x0

symbol

Specifies an image entry point as the address of symbol, for example: --entry=reset_handler

offset+object(section)

Specifies an image entry point as an offset inside a section within a particular object, for example:--entry=8+startup.o(startupseg)

There must be no spaces within the argument to --entry. The input section and object names are matched without case-sensitivity. You can use the following simplified notation:

  • object(section), if offset is zero.

  • object, if there is only one input section. armlink generates an error message if there is more than one code input section in object.

Note

If the entry address of your image is in Thumb state, then the least significant bit of the address must be set to 1. The linker does this automatically if you specify a symbol. For example, if the entry code starts at address 0x8000 in Thumb state you must use --entry=0x8001.

Note

If you use --ltcg, then only --entry=symbol can be used.

Usage

The image can contain multiple entry points, but the initial entry point specified with this option is stored in the executable file header for use by the loader. There can be only one occurrence of this option on the command line. A debugger typically uses this entry address to initialize the Program Counter (PC) when an image is loaded. The initial entry point must meet the following conditions:

  • the image entry point must lie within an execution region

  • the execution region must be non-overlay, and must be a root execution region (load address == execution address).

Was this page helpful? Yes No