Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752680AbeADSZY (ORCPT + 1 other); Thu, 4 Jan 2018 13:25:24 -0500 Received: from mout.web.de ([217.72.192.78]:51366 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752103AbeADSZV (ORCPT ); Thu, 4 Jan 2018 13:25:21 -0500 From: Markus To: Josh Poimboeuf Cc: Greg Kroah-Hartman , lkml , Ingo Molnar Subject: Re: objtool segfault with ORC unwinder enabled Date: Thu, 04 Jan 2018 19:25:12 +0100 Message-ID: <2483025.gTNvebosN7@markus> In-Reply-To: <20180104173203.zgy3g36wgaoeuii7@treble> References: <1537667.mbZVOcHbLR@markus> <2752107.fJzmbfloTe@markus> <20180104173203.zgy3g36wgaoeuii7@treble> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:TrdzBz+mN42jUnAm7KL+PBcpZcIQPyEBtS3xgpgwTVRGE71d5pk x/iRGT4gijhwJeWNOSVpOVa6JyNEgkHOmpYl+2hQxmTUeOkL797aPFa1YXLj3cSnrB1KBe8 z7I71HBcsH3y+C8c6OtJMHduY5PefCeVGgFccLXDlmUWKaCu/z48BY9c94gWFLpDCD9rzBi Pxtg/QK3KgYrAxVVmDRXQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:WxiU55EmlU4=:DmmMWc0fpSlJZh4M34YfBR ZdB4mrV8mpXx7AviAqwXtCS8j02cC4aBiobwcId5AE8kaLPaMxyYAc/vfEIa3XsFo55iGxYj9 PzvF8Y1egrHZMgdjCbkq6swsg6dWcAoQKBL1D2jHfRPAf0FJb465bIq1GIep7kSPEQWvaCTXH 6+wV7HgYKmOpqj/TCD4LtJyvN4uMsrn4+vKgeBuXheW++tMwSJPNC5SeJxoWbBVZ0e5KWbrwf 2gs7Wo1bX7UhmFWToLxIXhlNVEXRuUxCBWh/znNgiU9ncPOrM/CYSqSnSUBwmhzUvvxIjRfa9 ys8k9PIsNuMAj/s/VK5C0JBUDeqVVXSgKms2ql4CXdhWYxvK5O+cppA/W/OK5Ek9zqbnbXhif AWpUPyvHHsMZhFhZJCkBdXBFdGvOEPIIDLD35vKowjVlVm6pQg2oaYylDnKTs39sZBAIsv+C2 kH1fjbWxOo0MauKN6D3skwpD2su01T6W1dIZeVkalZym9HOkBh5kO1g1c76Ey01hPeVG9AoUa VrFzMNWFuNGgQ2f5j4UTgty+jmC+QYYao81SPa30QDLIGnFnTi83er21MGnCRAdMDS9aaypUj ncN4SKJ2Mm5FV+l7kop/rvr+YKWml2gdhMB8ZZ0RgCnE7gxz40rP4jPWSzL34ZCrZEoitYE5h eKT7cuJUFV2idJHdeaDP5fmTpMugbG/ppccs2YMbr83v+Es+JubAFwbcAgN5Tf9fZ+ZIu1Mgs YFE0llvlTMuLHJLJNuPEPVOoQhD3bFC8DTJ5As85TanFdfghG09MX998BawuXVUJkrsQWS7t0 +hCt1bK3KDbWodlMLzIp3yEwOU4ry9v8xUuig7KT35u27TECVw= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thursday, 4 January 2018 18:32:03 CET Josh Poimboeuf wrote: > On Thu, Jan 04, 2018 at 05:56:30PM +0100, Markus wrote: > > On Thursday, 4 January 2018 16:46:13 CET Josh Poimboeuf wrote: > > > I don't see anything unusual there. Are there any Gentoo patches > > > against either the kernel or GCC which would strip unused symbols? > > > > The kernel is the vanilla kernel. (4.14.11 and also 4.15-rc6) > > Its not a gentoo specific gcc patch. (Then every gentoo user would be > > affected?) > > > > But I enabled ld.gold as default linker like 5 years ago. Never had a > > problem with this. > > > > Is ld.gold supposed to fail here? > > > > I switched back to ld.bfd and it seems to work. > > Ah, that explains it. With CONFIG_MODVERSIONS, the linker does some > work after gcc, but before objtool. Can you try this patch? (Note this > isn't the final patch, as this breaks the CONFIG_MODVERSIONS=n case.) > > diff --git a/scripts/Makefile.build b/scripts/Makefile.build > index cb8997ed0149..3cf3cc6077ea 100644 > --- a/scripts/Makefile.build > +++ b/scripts/Makefile.build > @@ -270,7 +270,7 @@ endif > # 'OBJECT_FILES_NON_STANDARD_foo.o := 'n': override directory skip for a > file cmd_objtool = $(if $(patsubst y%,, \ > $(OBJECT_FILES_NON_STANDARD_$(basetarget).o)$ (OBJECT_FILES_NON_STANDARD)n) > , \ - $(__objtool_obj) $(objtool_args) "$(@)";) > + $(__objtool_obj) $(objtool_args) "$(@D)/.tmp_$(@F)";) > objtool_obj = $(if $(patsubst y%,, \ > $(OBJECT_FILES_NON_STANDARD_$(basetarget).o)$ (OBJECT_FILES_NON_STANDARD)n) > , \ $(__objtool_obj)) > @@ -286,16 +286,16 @@ objtool_dep = $(objtool_obj) \ > define rule_cc_o_c > $(call echo-cmd,checksrc) $(cmd_checksrc) \ > $(call cmd_and_fixdep,cc_o_c) \ > + $(call echo-cmd,objtool) $(cmd_objtool) \ > $(cmd_modversions_c) \ > $(cmd_checkdoc) \ > - $(call echo-cmd,objtool) $(cmd_objtool) \ > $(call echo-cmd,record_mcount) $(cmd_record_mcount) > endef > > define rule_as_o_S > $(call cmd_and_fixdep,as_o_S) \ > - $(cmd_modversions_S) \ > - $(call echo-cmd,objtool) $(cmd_objtool) > + $(call echo-cmd,objtool) $(cmd_objtool) \ > + $(cmd_modversions_S) > endef > > # List module undefined symbols (or empty line if not enabled) With that patch the kernel is building with ld.gold. BR, Markus