Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 12312

In arm64 assembly, what does "adrp x0, idmap_pg_dir;" instruction mean?

$
0
0

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.


Viewing all articles
Browse latest Browse all 12312

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>