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 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 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.
View all questions in GNU Toolchain forum