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.
Hi KishanLinaro GCC 6.2-2016.11 is quite old.There were some known issues with older GCC toolchains in this area - see e.g. patchwork.ozlabs.org/.../Suggest you retry with a more recent toolchain.By the way, you've posted to the wrong forum. For help on GCC from the Arm Community, please post to community.arm.com/.../gnu-toolchain-forumStephen
Thanks Stephen,
I posted same on community.arm.com/.../gnu-toolchain-forum . I tried with aarch64-linux-gnu-gcc (Linaro GCC 7.5-2019.12) 7.5.0 toolchain as well but no luck.
Regards,
Kishan