linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] powerpc: Drop -fno-dwarf2-cfi-asm
@ 2020-03-05 14:35 Naveen N. Rao
  2020-03-05 14:35 ` [PATCH 2/2] powerpc: Suppress .eh_frame generation Naveen N. Rao
  2020-04-01 12:53 ` [PATCH 1/2] powerpc: Drop -fno-dwarf2-cfi-asm Michael Ellerman
  0 siblings, 2 replies; 4+ messages in thread
From: Naveen N. Rao @ 2020-03-05 14:35 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Rasmus Villemoes

The original commit/discussion adding -fno-dwarf2-cfi-asm refers to
R_PPC64_REL32 relocations not being handled by our module loader:
http://lkml.kernel.org/r/20090224065112.GA6690@bombadil.infradead.org

However, that is now handled thanks to commit 9f751b82b491d
("powerpc/module: Add support for R_PPC64_REL32 relocations").

So, drop this flag from our Makefile.

Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
---
 arch/powerpc/Makefile | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index cbe5ca4f0ee5..89956c4f1ce3 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -239,11 +239,6 @@ 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)
-
 # Never use string load/store instructions as they are
 # often slow when they are implemented at all
 KBUILD_CFLAGS		+= $(call cc-option,-mno-string)
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] powerpc: Suppress .eh_frame generation
  2020-03-05 14:35 [PATCH 1/2] powerpc: Drop -fno-dwarf2-cfi-asm Naveen N. Rao
@ 2020-03-05 14:35 ` Naveen N. Rao
  2020-03-05 16:39   ` Segher Boessenkool
  2020-04-01 12:53 ` [PATCH 1/2] powerpc: Drop -fno-dwarf2-cfi-asm Michael Ellerman
  1 sibling, 1 reply; 4+ messages in thread
From: Naveen N. Rao @ 2020-03-05 14:35 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Rasmus Villemoes

GCC v8 defaults to enabling -fasynchronous-unwind-tables due to
https://gcc.gnu.org/r259298, which results in .eh_frame section being
generated. This results in additional disk usage by the build, as well
as the kernel modules. Since the kernel has no use for this, this
section is discarded.

Add -fno-asynchronous-unwind-tables to KBUILD_CFLAGS to suppress
generation of .eh_frame section. Note that our VDSOs need .eh_frame, but
are not affected by this change since our VDSO code are all in assembly.

Reported-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
---
 arch/powerpc/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 89956c4f1ce3..f310c32e88a4 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -239,6 +239,9 @@ KBUILD_CFLAGS += $(call cc-option,-mno-vsx)
 KBUILD_CFLAGS += $(call cc-option,-mno-spe)
 KBUILD_CFLAGS += $(call cc-option,-mspe=no)
 
+# Don't emit .eh_frame since we have no use for it
+KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
+
 # Never use string load/store instructions as they are
 # often slow when they are implemented at all
 KBUILD_CFLAGS		+= $(call cc-option,-mno-string)
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] powerpc: Suppress .eh_frame generation
  2020-03-05 14:35 ` [PATCH 2/2] powerpc: Suppress .eh_frame generation Naveen N. Rao
@ 2020-03-05 16:39   ` Segher Boessenkool
  0 siblings, 0 replies; 4+ messages in thread
From: Segher Boessenkool @ 2020-03-05 16:39 UTC (permalink / raw)
  To: Naveen N. Rao; +Cc: Rasmus Villemoes, linuxppc-dev

On Thu, Mar 05, 2020 at 08:05:30PM +0530, Naveen N. Rao wrote:
> GCC v8 defaults to enabling -fasynchronous-unwind-tables due to
> https://gcc.gnu.org/r259298, which results in .eh_frame section being
> generated. This results in additional disk usage by the build, as well
> as the kernel modules. Since the kernel has no use for this, this
> section is discarded.
> 
> Add -fno-asynchronous-unwind-tables to KBUILD_CFLAGS to suppress
> generation of .eh_frame section. Note that our VDSOs need .eh_frame, but
> are not affected by this change since our VDSO code are all in assembly.

That may change, but it is easy to change again for just the VDSOs.

> Reported-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>

Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org>

Thanks!


Segher

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] powerpc: Drop -fno-dwarf2-cfi-asm
  2020-03-05 14:35 [PATCH 1/2] powerpc: Drop -fno-dwarf2-cfi-asm Naveen N. Rao
  2020-03-05 14:35 ` [PATCH 2/2] powerpc: Suppress .eh_frame generation Naveen N. Rao
@ 2020-04-01 12:53 ` Michael Ellerman
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2020-04-01 12:53 UTC (permalink / raw)
  To: Naveen N. Rao, linuxppc-dev; +Cc: Rasmus Villemoes

On Thu, 2020-03-05 at 14:35:29 UTC, "Naveen N. Rao" wrote:
> The original commit/discussion adding -fno-dwarf2-cfi-asm refers to
> R_PPC64_REL32 relocations not being handled by our module loader:
> http://lkml.kernel.org/r/20090224065112.GA6690@bombadil.infradead.org
> 
> However, that is now handled thanks to commit 9f751b82b491d
> ("powerpc/module: Add support for R_PPC64_REL32 relocations").
> 
> So, drop this flag from our Makefile.
> 
> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>

Series applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/c04868df38d8d6239ef0f36f45dbba2624e6a9cb

cheers

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-01 13:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-05 14:35 [PATCH 1/2] powerpc: Drop -fno-dwarf2-cfi-asm Naveen N. Rao
2020-03-05 14:35 ` [PATCH 2/2] powerpc: Suppress .eh_frame generation Naveen N. Rao
2020-03-05 16:39   ` Segher Boessenkool
2020-04-01 12:53 ` [PATCH 1/2] powerpc: Drop -fno-dwarf2-cfi-asm Michael Ellerman

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).