Re: [PATCH v5 02/26] perf llvm: Fix arm64 adrp instruction disassembly mismatch with objdump

From: Namhyung Kim

Date: Wed Sep 09 2026 - 11:26:04 EST


On Tue, Sep 08, 2026 at 01:05:05PM +0000, Tengda Wu wrote:
> The operands of 'adrp' instructions parsed by libllvm are currently
> represented as raw immediates rather than the "address <symbol+offset>"
> format used by objdump. This inconsistency causes arm64_mov__parse()
> to fail when parsing these instructions during post-processing.
>
> Example of the mismatch:
> Current: adrp x18, 8014
> Objdump: adrp x18, ffff800081f5f000 <this_cpu_vector>
>
> Fix this by manually extracting the target address from the raw adrp
> instruction via symbol_lookup_callback(). The address is then converted
> to a specific symbol during symbol__disassemble_llvm() and formatted
> to match objdump's output, ensuring compatibility with existing
> parsers.
>
> Signed-off-by: Tengda Wu <wutengda@xxxxxxxxxxxxxxx>

Reviewed-by: Namhyung Kim <namhyung@xxxxxxxxxx>

Thanks,
Namhyung