ADRP command loading incorrect address.

Hi Arm experts,

I have a load command to load a structure in assembly code as below:

adrp x4,ASM_NAME(forkx)

This load instruction is not giving the proper address of the structure that i have intended: took the gdb trace at this point and following is the details:

1. We can see the register content at the time of load and x4 have 0x55783dd000

(gdb) info registers

x0             0x30a0   12448

x1             0x0      0

x2             0x7fdf1bf6b0     549203998384

x3             0x55ad57f898     367980443800

x4             0x55783dd000     367089537024

x5             0x0      0

x6             0x1      1

2. If i see the forkx address it is:

(gdb) print &forkx
$13 = (sprocess * __be *) 0x55783dd5c0 <__be_forkx>

My intention is to load the address 0x55783dd5c0 but it is loading 0x55783dd000. this is causing the issue in the subsequent commands as invalid address is gettig accessed.

Is this is a known behaviour with adrp? do i need to handle this with any other way? Please help me in this. Thanks.

More questions in this forum