From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58176 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726048AbgCEMrb (ORCPT ); Thu, 5 Mar 2020 07:47:31 -0500 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 025Cd2hW076536 for ; Thu, 5 Mar 2020 07:47:30 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2yhhy7yegw-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 05 Mar 2020 07:47:30 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 5 Mar 2020 12:47:27 -0000 Date: Thu, 05 Mar 2020 18:17:21 +0530 From: "Naveen N. Rao" Subject: eh_frame confusion References: <3b00b45f-74b5-13e3-9a98-c3d6b3bb7286@rasmusvillemoes.dk> <1583168442.ovqnxu16tp.naveen@linux.ibm.com> <1583169883.zo43kx69lm.naveen@linux.ibm.com> In-Reply-To: <1583169883.zo43kx69lm.naveen@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT Message-Id: <1583412126.fc8zskkv66.naveen@linux.ibm.com> Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: Linux Kbuild mailing list , LKML , "linuxppc-dev@lists.ozlabs.org" , Rasmus Villemoes , Michael Ellerman Cc: Segher Boessenkool Naveen N. Rao wrote: > Naveen N. Rao wrote: >> Rasmus Villemoes wrote: > Can you check if the below patch works? I am yet to test this in more > detail, but would be good to know the implications for ppc32. > > - Naveen > > > --- > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile > index f35730548e42..5b5bf98b8217 100644 > --- a/arch/powerpc/Makefile > +++ b/arch/powerpc/Makefile > @@ -239,10 +239,7 @@ KBUILD_CFLAGS += $(call cc-option,-mno-vsx) > KBUILD_CFLAGS += $(call cc-option,-mno-spe) > KBUILD_CFLAGS += $(call cc-option,-mspe=no) > > -# FIXME: the module load should be taught about the additional relocs > -# generated by this. > -# revert to pre-gcc-4.4 behaviour of .eh_frame > -KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) > +KBUILD_CFLAGS += $(call cc-option,-fno-asynchronous-unwind-tables) In terms of the CFI information, the primary difference I see with -fno-dwarf2-cfi-asm is that when dumping the debug frames, CIE indicates version 3, while otherwise (i.e., without -fno-dwarf2-cfi-asm and with/without -fasynchronous-unwind-tables), it is version 1, regardless of -gdwarf-2/-gdwarf-4. There are few more minor changes, but none of these looked significant to me. > > # Never use string load/store instructions as they are > # often slow when they are implemented at all > diff --git a/arch/powerpc/kernel/vdso32/Makefile b/arch/powerpc/kernel/vdso32/Makefile > index e147bbdc12cd..d43b0b18137c 100644 > --- a/arch/powerpc/kernel/vdso32/Makefile > +++ b/arch/powerpc/kernel/vdso32/Makefile > @@ -25,6 +25,7 @@ KCOV_INSTRUMENT := n > UBSAN_SANITIZE := n > > ccflags-y := -shared -fno-common -fno-builtin -nostdlib \ > + -fasynchronous-unwind-tables \ > -Wl,-soname=linux-vdso32.so.1 -Wl,--hash-style=both > asflags-y := -D__VDSO32__ -s > > diff --git a/arch/powerpc/kernel/vdso64/Makefile b/arch/powerpc/kernel/vdso64/Makefile > index 32ebb3522ea1..b2cbb5c49bad 100644 > --- a/arch/powerpc/kernel/vdso64/Makefile > +++ b/arch/powerpc/kernel/vdso64/Makefile > @@ -13,6 +13,7 @@ KCOV_INSTRUMENT := n > UBSAN_SANITIZE := n > > ccflags-y := -shared -fno-common -fno-builtin -nostdlib \ > + -fasynchronous-unwind-tables \ > -Wl,-soname=linux-vdso64.so.1 -Wl,--hash-style=both > asflags-y := -D__VDSO64__ -s The above vdso hunks can be dropped since all our VDSO are assembly, so the above have no impact. - Naveen