Re: [PATCH 00/15] Add support for clang LTO

From: Sami Tolvanen
Date: Thu Nov 09 2017 - 11:31:55 EST


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