Linker might relax adrp + ldr got address loading to adrp + add for
local non-preemtable symbols (e.g. hiddeng/protected/symbols in
executable). As usually linker doesn't change relocations properly after
releaxation, so we have to handle such cases by ourselves. To do that
during relocations reading we change LD64 reloc to ADD if instruction
missmatch found and introduce FixRelaxationPass that founds ADRP+ADD
pairs and after perfoming some checks we're replacing ADRP target symbol
to already fixed ADDs one.
Vladislav Khmelevsky,
Advanced Software Technology Lab, Huawei