From patchwork Tue Feb 24 06:51:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyle McMartin X-Patchwork-Id: 23601 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 174A8DDEF0 for ; Tue, 24 Feb 2009 18:03:16 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C2775DDE2A for ; Tue, 24 Feb 2009 17:51:15 +1100 (EST) Received: from kyle by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1Lbr8K-0006hl-AU; Tue, 24 Feb 2009 06:51:12 +0000 Date: Tue, 24 Feb 2009 01:51:12 -0500 From: Kyle McMartin To: linuxppc-dev@ozlabs.org Subject: [PATCH/RFC] powerpc: avoid generating .eh_frame sections with gcc-4.4 Message-ID: <20090224065112.GA6690@bombadil.infradead.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Mailman-Approved-At: Tue, 24 Feb 2009 18:01:21 +1100 Cc: kyle@redhat.com, aoliva@redhat.com, linux-kernel@vger.kernel.org, roland@redhat.com X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: kyle@infradead.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org From: Kyle McMartin 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 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 = \