[BOLT-AArch64] Detect linker stubs and address them
Summary: In AArch64, when the binary gets large, the linker inserts stubs with 3 instructions: ADRP to load the PC-relative address of a page; ADD to add the offset of the page; and a branch instruction to do an indirect jump to the contents of X16 (the linker-reserved reg). The problem is that the linker does not issue a relocation for this (since this is not code coming from the assembler), so BOLT has no idea what is the real target, unless it recognizes these instructions and extract the target by combining the operands of the instructions from the stub. This diff does exactly that. (cherry picked from FBD7882653)
Loading
Please sign in to comment