linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC] powerpc: avoid generating .eh_frame sections with gcc-4.4
@ 2009-02-24  6:51 Kyle McMartin
  2009-02-24  8:40 ` Sam Ravnborg
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Kyle McMartin @ 2009-02-24  6:51 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: kyle, aoliva, linux-kernel, roland

From: Kyle McMartin <kyle@redhat.com>

On ppc64 (at least) gcc-4.4 is defaulting to generating .eh_frame
sections, which are, for the kernel, fairly pointless. Additionally, on
ppc64 this generates a relocation format which the kernel module loader
does not currently support (R_PPC64_REL32.)

Alexandre Oliva verifies that -fno-dwarf2-cfi-asm prevents this
.eh_frame section from being generated.

These seem to be used for unwinding, but it doesn't look like we
currently use them anywhere. (In fact, we explicitly dump them in the
x86_64 linker script.)

If these .eh_frame sections are eventually used, adding a per-arch
CONFIG_WANT_UNWIND check would be trivial.

(This was reported against Fedora, which appears to be the only distro
doing any building against gcc-4.4 at present: RH bz#486545.)

Signed-off-by: Kyle McMartin <kyle@redhat.com>
Cc: roland@redhat.com
Cc: aoliva@redhat.com

---
diff --git a/Makefile b/Makefile
index df6ce3e..d66a512 100644
--- a/Makefile
+++ b/Makefile
@@ -566,6 +566,11 @@ KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
 # disable pointer signed / unsigned warnings in gcc 4.0
 KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,)
 
+# gcc-4.4 defaults to generating .eh_frame sections, but we aren't
+# interested in those currently. additionally, it causes issues on some
+# architectures.
+KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
+
 # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
 # But warn user when we do so
 warn-assign = \

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

end of thread, other threads:[~2009-02-25  5:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-24  6:51 [PATCH/RFC] powerpc: avoid generating .eh_frame sections with gcc-4.4 Kyle McMartin
2009-02-24  8:40 ` Sam Ravnborg
2009-02-24 11:25   ` Alexandre Oliva
2009-02-24 17:48   ` Kyle McMartin
2009-02-24 23:36 ` Roland McGrath
2009-02-25  5:47 ` Sam Ravnborg
2009-02-25  5:46   ` Kyle McMartin

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