ADRP command getting crashed.

Writing an assembly code and want to make the ASLR (Address Space Layout Randomisation) complaint code. 

armb8le platform (64 bit)

Previously was using LDR command to load the fork function as below:

ldr x4,=ASM_NAME(forkx)

From the ARM manual came to know that the for PC relative jump we need to use the ADR command and which will make it ASLR complaint. So now using ADRP command as below, chosen ADRP because of relative jump is more in this case, also ADR command used to give error.

adrp x4, ASM_NAME(forkx)

After doing this, now my binary generated the free of textrel segment and ASLR complaint.

But when i load the image it is getting crashed and traceback point to the function where this changes are done.

Also after loading x4 is getting used with load and store operation.

Please can anyone help in this? is there any problem in using these instruction like this?

More questions in this forum