From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752464AbdI2UBA (ORCPT ); Fri, 29 Sep 2017 16:01:00 -0400 Received: from mail-pf0-f172.google.com ([209.85.192.172]:44986 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752294AbdI2UA7 (ORCPT ); Fri, 29 Sep 2017 16:00:59 -0400 X-Google-Smtp-Source: AOwi7QBcI3rPiVvP4egr3yhQ2N65oZexkEBldNUYykM36fdevGbXH25pb4XJi0bSpXOhoHNB/AMQMw== Date: Fri, 29 Sep 2017 13:00:56 -0700 From: Guenter Roeck To: Josh Poimboeuf Cc: linux-kernel@vger.kernel.org Subject: Problems compiling with KCFLAGS="-frecord-gcc-switches" Message-ID: <20170929200056.GA3303@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Josh, when trying to compile an image with KCFLAGS="-frecord-gcc-switches", I get the folllowing build warning/error. make allmodconfig KCFLAGS="-frecord-gcc-switches" make arch/x86/kvm/emulate.o ./tools/objtool/objtool check --no-unreachable "arch/x86/kvm/emulate.o" arch/x86/kvm/emulate.o: warning: objtool: .GCC.command.line+0x0: special: can't find new instruction Building a full image aborts with: WARNING: arch/x86/kvm/kvm.o(__ex_table+0x4c): Section mismatch in reference from the (unknown reference) (unknown) to the variable .GCC.command.line:kvm_fastop_exception FATAL: The relocation at __ex_table+0x4c references section ".GCC.command.line" which is not executable, IOW the kernel will fault if it ever tries to jump to it. Something is seriously wrong and should be fixed. make[2]: *** [arch/x86/kvm/kvm.o] Error 1 Any idea what might cause this problem ? Thanks, Guenter