2.5.2. The vector table

All ARM systems have a vector table. The vector table does not form part of the initialization sequence, but it must be present for any exception to be serviced.

The code in Example 2.7 imports the various exception handlers that might be coded in other modules. The vector table is a list of branch instructions to the exception handlers.

The FIQ handler is placed at address 0x1C directly. This avoids having to execute a branch to the FIQ handler, so optimizing FIQ response time.

Example 2.7. The vector table code

        PRESERVE8

    AREA Vectors, CODE, READONLY
    IMPORT Reset_Handler
; import other exception handlers
    ; ...
    ENTRY
    B   Reset_Handler
    B   Undefined_Handler
    B   SVC_Handler
    B   Prefetch_Handler
    B   Abort_Handler
    NOP                 ; Reserved vector
    B   IRQ_Handler
    B   FIQ_Handler
        END

Note

The vector table is marked with the label ENTRY. This label informs the linker that this code is a possible entry point, and so cannot be removed from the image at link time. You must select one of the possible image entry points as the true entry point to your application using the --entry linker option. See RealView Compilation Tools v3.0 Linker and Utilities Guide for more information.

Copyright © 2002-2006 ARM Limited. All rights reserved.ARM DUI 0203G
Non-Confidential