Hi Experts,
We are using address which is more than 32 bits with for example : 0x1000000000
when comes to adrp instruction it is giving following error.:
relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against symbol `__BSS_START__' defined in .bss section in
ADRP Usage:
adrp x0, __BSS_START__add x0, x0, :lo12:__BSS_START__
what could be possible solution for this?
When I tried to replace adrp and add with ldr instruction it works fine but is there any way that we can continue with adrp instruction?
LDR Usage:
ldr x0, = __BSS_START__
We are using aarch64-linux-gnu-gcc (Linaro GCC 6.2-2016.11) 6.2.1 20161016 toolchain.
we also tried with latest tool chain (aarch64-linux-gnu-gcc (Linaro GCC 7.5-2019.12) 7.5.0) but no luck.
Please help.
Regards,
Kishan Patel
+-----------------+ <--- page boundary | | ~ ~ 4GB area | | | | +-----------------+ <--- page boundary | | |adrp | ~ ~ 4GB area | | +-----------------+ <--- page boundary
Thank you for clarification