[lld-macho] Add LOH_ARM64_ADRP_LDR_GOT_LDR optimization hint support
This hint instructs the linker to relax a GOT-indirect load. If the referenced symbol is external and its GOT entry is within +/- 1 MiB, the GOT entry can be loaded with a single literal ldr instruction. If the referenced symbol is local, its address may be loaded directly if it's close enough, or with an adr(p) + ldr pair if it's not. This type accounts for more than half of all LOHs in chromium_framework. This commit moves the eligibility checks into helper functions to improve the readability of the LOH processing code. Ho functional changes are intended to the previously implemented LOH types. Differential Revision: https://reviews.llvm.org/D129427
Loading
Please sign in to comment