12.50 --entry=location

Specifies the unique initial entry point of the image. Although an image can have multiple entry points, only one can be the initial entry point.



Where location is one of the following:


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


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


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.


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.


The image can contain multiple entry points. Multiple entry points might be specified with the ENTRY directive in assembler source files. In such cases, a unique initial entry point must be specified for an image, otherwise the error L6305E is generated. The initial entry point specified with the --entry 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).

Non-ConfidentialPDF file icon PDF versionARM DUI0474M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.