linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Naveen N. Rao" <naveen.n.rao@linux.ibm.com>
To: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Michael Ellerman <mpe@ellerman.id.au>
Subject: eh_frame confusion
Date: Thu, 05 Mar 2020 18:17:21 +0530	[thread overview]
Message-ID: <1583412126.fc8zskkv66.naveen@linux.ibm.com> (raw)
In-Reply-To: <1583169883.zo43kx69lm.naveen@linux.ibm.com>

Naveen N. Rao wrote:
> Naveen N. Rao wrote:
>> Rasmus Villemoes wrote:
<snip>
> 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


  parent reply	other threads:[~2020-03-05 12:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-02 10:56 eh_frame confusion Rasmus Villemoes
2020-03-02 12:44 ` Segher Boessenkool
2020-03-02 17:17   ` Naveen N. Rao
2020-03-02 17:09 ` Naveen N. Rao
2020-03-02 17:32   ` Naveen N. Rao
2020-03-03  9:50     ` Rasmus Villemoes
2020-03-05 12:47     ` Naveen N. Rao [this message]
2020-03-03 10:28   ` Michael Ellerman
2020-03-05 12:41     ` Naveen N. Rao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1583412126.fc8zskkv66.naveen@linux.ibm.com \
    --to=naveen.n.rao@linux.ibm.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).