[PATCH 00/15] Add support for clang LTO

Sami Tolvanen samitolvanen at google.com
Thu Nov 9 08:31:44 PST 2017


On Thu, Nov 09, 2017 at 07:54:40PM +0900, AKASHI Takahiro wrote:
> Add -fno-jump-tables to ccflags-y of arch/arm64/kvm/hyp/Makefile.
> Without this option, clang generates a branch instruction (br x11)
> to an absolute (EL1) virtual address.

Yes, the behavior changed in LLVM r308050, which is part of the 5.0
release, but not in the latest Android clang prebuilts. Before this
change, no branches were generated in __init_stage2_translation.

Using -mllvm -jump-threading-threshold=0 also appears to solve this
problem.

Sami



More information about the linux-arm-kernel mailing list