Linker failure with relocation type `R_MORELLO_LD_PREL_LO17`
The linker fails with the following code
.section my_section,"awx"
.p2align 4
data_cap:
.chericap 0
ldr c9, data_cap
br c9
and gives error message: aarch64-unknown-freebsd-ld.lld: error: relocation R_MORELLO_LD_PREL_LO17 cannot be used against local symbol; recompile with -fPIC
when it should successfully relocate the address of data_cap
.
A fix suggested by @jrtc27 is to include R_MORELLO_VADREF
in isRelExpr
in lld/ELF/Relocations.cpp
.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information