如何找到@PAGE/@PAGEOFF的偏移值 [英] How to find the offset value of @PAGE/@PAGEOFF

查看:51
本文介绍了如何找到@PAGE/@PAGEOFF的偏移值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

查看反汇编代码,我看到如下指令:

Looking into a disassembly code, I saw the instructions like:

adrp x8,l066@PAGE
add x8,x8,l066@PAGEOFF

它们是在某处定义的偏移标签吗?以及如何找到它们的价值?

Are they the offset labels being defined somewhere? And how to find the value of them?

推荐答案

@page@pageoff 是汇编指令,用于计算链接时的偏移量.@page 取符号的位置无关的 4k 页偏移量,并使用 PC 将其转换为绝对页地址.@pageoff 给出符号所在页面的偏移量.它们一起能够以与位置无关的方式生成 64 位地址.

@page and @pageoff are assembler directives to calculate the offset at link time. @page takes the position independent 4k page offset of the symbol and uses the PC to convert it into an absolute page address. @pageoff gives the offset into the page that the symbol is located. Together they are able to generate a 64-bit address in a position-independent way.

这篇关于如何找到@PAGE/@PAGEOFF的偏移值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆