Below is an in-depth explanation of the AArch64 (ARM64) unconditional branch instruction—often simply called the “B” instruction—and how its 26‐bit immediate field (imm26) is laid out and later relocated during linking.


Instruction Layout

The unconditional branch in AArch64 is encoded in a 32‑bit instruction. Its layout is as follows:

Bits:  31         26 25                           0
        +-------------+------------------------------+
        |  Opcode     |          imm26               |
        +-------------+------------------------------+