From: Denys Vlasenko <vda.linux@googlemail.com>
To: linux-arch@vger.kernel.org
Cc: Russell King <rmk@arm.linux.org.uk>,
David Howells <dhowells@redhat.com>,
Ralf Baechle <ralf@linux-mips.org>,
Lennert Buytenhek <kernel@wantstofly.org>,
Josh Boyer <jwboyer@linux.vnet.ibm.com>,
Paul Mackerras <paulus@samba.org>,
David Woodhouse <dwmw2@infradead.org>,
Andi Kleen <andi@firstfloor.org>,
torvalds@linux-foundation.org, akpm@linux-foundation.org,
Paul Gortmaker <paul.gortmaker@windriver.com>,
linux-embedded@vger.kernel.org, linux-kernel@vger.kernel.org,
Tim Bird <tim.bird@am.sony.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Dave Miller <davem@davemloft.net>
Subject: [PATCH 19/23] make section names compatible with -ffunction-sections -fdata-sections: sparc
Date: Wed, 2 Jul 2008 02:41:35 +0200 [thread overview]
Message-ID: <200807020241.35406.vda.linux@googlemail.com> (raw)
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.linux@googlemail.com>
--
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 <asm/asi.h>
reply other threads:[~2008-07-02 0:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200807020241.35406.vda.linux@googlemail.com \
--to=vda.linux@googlemail.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=dwmw2@infradead.org \
--cc=jwboyer@linux.vnet.ibm.com \
--cc=kernel@wantstofly.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-embedded@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=paulus@samba.org \
--cc=ralf@linux-mips.org \
--cc=rmk@arm.linux.org.uk \
--cc=schwidefsky@de.ibm.com \
--cc=tim.bird@am.sony.com \
--cc=torvalds@linux-foundation.org \
/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).