Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762745AbYGAWmF (ORCPT ); Tue, 1 Jul 2008 18:42:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1763151AbYGAWlb (ORCPT ); Tue, 1 Jul 2008 18:41:31 -0400 Received: from qb-out-0506.google.com ([72.14.204.228]:18988 "EHLO qb-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763138AbYGAWl2 (ORCPT ); Tue, 1 Jul 2008 18:41:28 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:subject:date:user-agent:cc:mime-version:content-disposition :content-type:content-transfer-encoding:message-id; b=LwPlfN6B30jRB1yNLh/iAUh87WeASgKl/wYcCXobKBQvODXv9w0+6GY0ilUpdPBoKP /3ytfLO18tOC4il1/gLwsCScNk0xL1pv64a8RBiSX/JHCxASz8UqIQIB+saFVP0fteJP q0Ay5QtMw4PXreYdabjXQesVauhxtKFSXG/O0= From: Denys Vlasenko To: linux-arch@vger.kernel.org Subject: [PATCH 19/23] make section names compatible with -ffunction-sections -fdata-sections: sparc Date: Wed, 2 Jul 2008 02:41:35 +0200 User-Agent: KMail/1.8.2 Cc: Russell King , David Howells , Ralf Baechle , Lennert Buytenhek , Josh Boyer , Paul Mackerras , David Woodhouse , Andi Kleen , torvalds@linux-foundation.org, akpm@linux-foundation.org, Paul Gortmaker , linux-embedded@vger.kernel.org, linux-kernel@vger.kernel.org, Tim Bird , Martin Schwidefsky , Dave Miller MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200807020241.35406.vda.linux@googlemail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3296 Lines: 105 The purpose of this patch is to make kernel buildable with "gcc -ffunction-sections -fdata-sections". This patch fixes sparc architecture. Signed-off-by: Denys Vlasenko -- vda --- 0.org/arch/sparc/boot/btfixupprep.c Wed Jul 2 00:40:42 2008 +++ 1.fixname/arch/sparc/boot/btfixupprep.c Wed Jul 2 00:45:57 2008 @@ -171,7 +171,7 @@ } } else if (buffer[nbase+4] != '_') continue; - if (!strcmp (sect, ".text.exit")) + if (!strcmp (sect, ".exit.text")) continue; if (strcmp (sect, ".text") && strcmp (sect, ".init.text") && @@ -325,7 +325,7 @@ (*rr)->next = NULL; } printf("! Generated by btfixupprep. Do not edit.\n\n"); - printf("\t.section\t\".data.init\",#alloc,#write\n\t.align\t4\n\n"); + printf("\t.section\t\".init.data\",#alloc,#write\n\t.align\t4\n\n"); printf("\t.global\t___btfixup_start\n___btfixup_start:\n\n"); for (i = 0; i < last; i++) { f = array + i; --- 0.org/arch/sparc/kernel/head.S Wed Jul 2 00:40:42 2008 +++ 1.fixname/arch/sparc/kernel/head.S Wed Jul 2 00:44:28 2008 @@ -742,7 +742,7 @@ nop /* The code above should be at beginning and we have to take care about - * short jumps, as branching to .text.init section from .text is usually + * short jumps, as branching to .init.text section from .text is usually * impossible */ __INIT /* Acquire boot time privileged register values, this will help debugging. --- 0.org/arch/sparc/kernel/vmlinux.lds.S Wed Jul 2 00:40:42 2008 +++ 1.fixname/arch/sparc/kernel/vmlinux.lds.S Wed Jul 2 00:45:51 2008 @@ -86,12 +86,12 @@ . = ALIGN(PAGE_SIZE); __init_end = .; . = ALIGN(32); - .data.cacheline_aligned : { - *(.data.cacheline_aligned) + .cacheline_aligned.data : { + *(.cacheline_aligned.data) } . = ALIGN(32); - .data.read_mostly : { - *(.data.read_mostly) + .read_mostly.data : { + *(.read_mostly.data) } __bss_start = .; --- 0.org/arch/sparc64/kernel/head.S Wed Jul 2 00:40:42 2008 +++ 1.fixname/arch/sparc64/kernel/head.S Wed Jul 2 00:44:28 2008 @@ -466,7 +466,7 @@ jmpl %g2 + %g0, %g0 nop - .section .text.init.refok + .section .init.refok.text sun4u_init: BRANCH_IF_SUN4V(g1, sun4v_init) --- 0.org/arch/sparc64/kernel/vmlinux.lds.S Wed Jul 2 00:40:42 2008 +++ 1.fixname/arch/sparc64/kernel/vmlinux.lds.S Wed Jul 2 00:45:51 2008 @@ -32,12 +32,12 @@ *(.data1) } . = ALIGN(64); - .data.cacheline_aligned : { - *(.data.cacheline_aligned) + .cacheline_aligned.data : { + *(.cacheline_aligned.data) } . = ALIGN(64); - .data.read_mostly : { - *(.data.read_mostly) + .read_mostly.data : { + *(.read_mostly.data) } _edata = .; PROVIDE (edata = .); --- 0.org/include/asm-sparc/cache.h Wed Jul 2 00:40:51 2008 +++ 1.fixname/include/asm-sparc/cache.h Wed Jul 2 00:45:45 2008 @@ -19,7 +19,7 @@ #define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT) -#define __read_mostly __attribute__((__section__(".data.read_mostly"))) +#define __read_mostly __attribute__((__section__(".read_mostly.data"))) #ifdef CONFIG_SPARC32 #include -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/