https://stackoverflow.com/questions/15774581/getting-an-label-address-to-a-register-on-arm
1 2 3 4 | adr r0,target adrl r0,target ldr r0,=target sub r0,pc,#(.+8-target) |
The first two are very similar and generate
1 | sub r0,pc,#offset |
The 3rd puts a long in a literal pool and loads this via
1 | ldr r0,[pc,#offset2] |
or it may use a mov if the assembler finds it can (usually an aligned label, like at 0x8000).
The last version is to manually calculated it.