[llvm-dev] Building llvm with clang and lld on arm and the llvm arm backend relocation on position independent code

Rafael Avila de Espindola via llvm-dev llvm-dev at lists.llvm.org
Thu Jun 29 17:49:53 PDT 2017

Peter Smith via llvm-dev <llvm-dev at lists.llvm.org> writes:

> Hello Alessandro,
> Despite the statement in the HowToCrossCompileLLVM guide "If you’re
> using Clang as the cross-compiler, there is a problem in the LLVM ARM
> back-end that is producing absolute relocations on
> position-independent code (R_ARM_THM_MOVW_ABS_NC), so for now, you
> should disable PIC:" I can't find an existing upstream PR or any
> record that this has been fixed. If the ARM backend is still producing
> an R_ARM_THM_MOVW_ABS_NC relocation when -fpic is given as an option
> then it would be great to get a small reproducible example in a new
> PR, or if there is one already to update it.

I am pretty sure we don't try using movw/movt with pic on ELF:


More information about the llvm-dev mailing list