Skip to content
Commit 54418125 authored by Kristina Bessonova's avatar Kristina Bessonova
Browse files

[llvm-objdump][AArch64] Fix ADRP target label calculation

This patch makes ADRP target label address calculations the same as
label address calculations (see AArch64InstPrinter::printAdrpLabel()).

Otherwise the target label looks misleading as ADRP's immediate offset is,
actually, not an offset to this PC, but an offset to the current PC's
page address in pages.

See for example, `llvm-objdump/ELF/AArch64/pcrel-address.yaml`.
Before this patch the target label `<_start+0x80>` represents the
address `0x200100 + 0x80` while `0x220000` is expected.

Note that with this patch llvm-objdump output matches GNU objdump.

Reviewed By: simon_tatham

Differential Revision: https://reviews.llvm.org/D139407
parent 6dcf9371
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment