Relative References in ARM64 Disassembly

General News

Summary

POV: You are a compiler targeting arm64, and you want some code to reference this global variable from the same library. The classic way to do this is to emit an instruction that loads “the address of X”, which will be determined at run time by the dynamic loader. The dynamic loader isn’t going to break it up from this code, and if we knew how far away it was we could reference it that way. In real life, the code was a call to , and the global was the selector. To do this computation by hand, we take the address of the instruction and drop the last three hex digits, because 4Ki is 0x1000.

Classifications

industries
EduTech - institutions
applications
E-Commerce EDI Software

AskAI Classifications

Labels
Operating Systems Consumer Software Cloud Services

Linked Companies

Apple Inc.
$1B+
Arm
$1B+