A question on arm64 assembly language.
For example in linux 5.9.15 source code, in arch/arm64/kernel/vmlinux.lds.S (linker script), there is a line idmap_pg_dir = .;
. so idmap_pg_dir is an address. Now, in arch/arm64/kernel/head.S, there is a line adrp x0, idmap_pg_dir
. Does this mean
1) x0 = PC + idmap_pg_dir or 2) x0 = idmap_pg_dir ?
I thought when we do adrp x0, addr1
, usually addr1
is a PC-relative address offset and x0 becomes PC + addr
. But the linker script seems to say idmap_pg_dir
is just an absolute address. (is it not?) So I'm confused. Please someone correct me.