linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 15/23] make section names compatible with -ffunction-sections -fdata-sections: powerpc
Date: Wed, 2 Jul 2008 02:39:36 +0200	[thread overview]
Message-ID: <200807020239.36751.vda.linux@googlemail.com> (raw)

The purpose of this patch is to make kernel buildable
with "gcc -ffunction-sections -fdata-sections".
This patch fixes powerpc architecture.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda


--- 0.org/arch/powerpc/kernel/head_32.S	Wed Jul  2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/head_32.S	Wed Jul  2 00:44:22 2008
@@ -49,7 +49,7 @@
 	mtspr	SPRN_DBAT##n##L,RB;	\
 1:
 
-	.section	.text.head, "ax"
+	.section	.head.text, "ax"
 	.stabs	"arch/powerpc/kernel/",N_SO,0,0,0f
 	.stabs	"head_32.S",N_SO,0,0,0f
 0:
--- 0.org/arch/powerpc/kernel/head_40x.S	Wed Jul  2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/head_40x.S	Wed Jul  2 00:44:22 2008
@@ -52,7 +52,7 @@
  *
  * This is all going to change RSN when we add bi_recs.......  -- Dan
  */
-	.section	.text.head, "ax"
+	.section	.head.text, "ax"
 _ENTRY(_stext);
 _ENTRY(_start);
 
--- 0.org/arch/powerpc/kernel/head_44x.S	Wed Jul  2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/head_44x.S	Wed Jul  2 00:44:22 2008
@@ -50,7 +50,7 @@
  *   r7 - End of kernel command line string
  *
  */
-	.section	.text.head, "ax"
+	.section	.head.text, "ax"
 _ENTRY(_stext);
 _ENTRY(_start);
 	/*
--- 0.org/arch/powerpc/kernel/head_8xx.S	Wed Jul  2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/head_8xx.S	Wed Jul  2 00:44:22 2008
@@ -38,7 +38,7 @@
 #else
 #define DO_8xx_CPU6(val, reg)
 #endif
-	.section	.text.head, "ax"
+	.section	.head.text, "ax"
 _ENTRY(_stext);
 _ENTRY(_start);
 
--- 0.org/arch/powerpc/kernel/head_fsl_booke.S	Wed Jul  2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/head_fsl_booke.S	Wed Jul  2 00:44:22 2008
@@ -52,7 +52,7 @@
  *   r7 - End of kernel command line string
  *
  */
-	.section	.text.head, "ax"
+	.section	.head.text, "ax"
 _ENTRY(_stext);
 _ENTRY(_start);
 	/*
--- 0.org/arch/powerpc/kernel/init_task.c	Wed Jul  2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/init_task.c	Wed Jul  2 00:45:57 2008
@@ -22,7 +22,7 @@
  * "init_task" linker map entry..
  */
 union thread_union init_thread_union 
-	__attribute__((__section__(".data.init_task"))) =
+	__attribute__((__section__(".init_task.data"))) =
 		{ INIT_THREAD_INFO(init_task) };
 
 /*
--- 0.org/arch/powerpc/kernel/machine_kexec_64.c	Wed Jul  2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/machine_kexec_64.c	Wed Jul  2 00:45:57 2008
@@ -250,7 +250,7 @@
  * current, but that audit has not been performed.
  */
 union thread_union kexec_stack
-	__attribute__((__section__(".data.init_task"))) = { };
+	__attribute__((__section__(".init_task.data"))) = { };
 
 /* Our assembly helper, in kexec_stub.S */
 extern NORET_TYPE void kexec_sequence(void *newstack, unsigned long start,
--- 0.org/arch/powerpc/kernel/vdso.c	Wed Jul  2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/vdso.c	Wed Jul  2 00:46:09 2008
@@ -74,7 +74,7 @@
 static union {
 	struct vdso_data	data;
 	u8			page[PAGE_SIZE];
-} vdso_data_store __attribute__((__section__(".data.page_aligned")));
+} vdso_data_store __attribute__((__section__(".page_aligned.data")));
 struct vdso_data *vdso_data = &vdso_data_store.data;
 
 /* Format of the patch table */
--- 0.org/arch/powerpc/kernel/vdso32/vdso32_wrapper.S	Wed Jul  2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/vdso32/vdso32_wrapper.S	Wed Jul  2 00:46:09 2008
@@ -1,7 +1,7 @@
 #include <linux/init.h>
 #include <asm/page.h>
 
-	.section ".data.page_aligned"
+	.section ".page_aligned.data"
 
 	.globl vdso32_start, vdso32_end
 	.balign PAGE_SIZE
--- 0.org/arch/powerpc/kernel/vdso64/vdso64_wrapper.S	Wed Jul  2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/vdso64/vdso64_wrapper.S	Wed Jul  2 00:46:09 2008
@@ -1,7 +1,7 @@
 #include <linux/init.h>
 #include <asm/page.h>
 
-	.section ".data.page_aligned"
+	.section ".page_aligned.data"
 
 	.globl vdso64_start, vdso64_end
 	.balign PAGE_SIZE
--- 0.org/arch/powerpc/kernel/vmlinux.lds.S	Wed Jul  2 00:40:41 2008
+++ 1.fixname/arch/powerpc/kernel/vmlinux.lds.S	Wed Jul  2 00:54:28 2008
@@ -33,9 +33,9 @@
 	/* Text and gots */
 	.text : AT(ADDR(.text) - LOAD_OFFSET) {
 		ALIGN_FUNCTION();
-		*(.text.head)
+		*(.head.text)
 		_text = .;
-		*(.text .fixup .text.init.refok .exit.text.refok)
+		*(.text .fixup .init.refok.text .exit.refok.text)
 		SCHED_TEXT
 		LOCK_TEXT
 		KPROBES_TEXT
@@ -144,10 +144,10 @@
 	}
 #endif
 	. = ALIGN(PAGE_SIZE);
-	.data.percpu  : AT(ADDR(.data.percpu) - LOAD_OFFSET) {
+	.percpu.data  : AT(ADDR(.percpu.data) - LOAD_OFFSET) {
 		__per_cpu_start = .;
-		*(.data.percpu)
-		*(.data.percpu.shared_aligned)
+		*(.percpu.data)
+		*(.percpu.shared_aligned.data)
 		__per_cpu_end = .;
 	}
 
@@ -204,28 +204,28 @@
 #else
 	. = ALIGN(16384);
 #endif
-	.data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
-		*(.data.init_task)
+	.init_task.data : AT(ADDR(.init_task.data) - LOAD_OFFSET) {
+		*(.init_task.data)
 	}
 
 	. = ALIGN(PAGE_SIZE);
-	.data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
-		*(.data.page_aligned)
+	.page_aligned.data : AT(ADDR(.page_aligned.data) - LOAD_OFFSET) {
+		*(.page_aligned.data)
 	}
 
-	.data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
-		*(.data.cacheline_aligned)
+	.cacheline_aligned.data : AT(ADDR(.cacheline_aligned.data) - LOAD_OFFSET) {
+		*(.cacheline_aligned.data)
 	}
 
 	. = ALIGN(L1_CACHE_BYTES);
-	.data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) {
-		*(.data.read_mostly)
+	.read_mostly.data : AT(ADDR(.read_mostly.data) - LOAD_OFFSET) {
+		*(.read_mostly.data)
 	}
 
 	. = ALIGN(PAGE_SIZE);
 	.data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
 		__nosave_begin = .;
-		*(.data.nosave)
+		*(.nosave.data)
 		. = ALIGN(PAGE_SIZE);
 		__nosave_end = .;
 	}
--- 0.org/include/asm-powerpc/cache.h	Wed Jul  2 00:40:50 2008
+++ 1.fixname/include/asm-powerpc/cache.h	Wed Jul  2 00:45:45 2008
@@ -35,7 +35,7 @@
 #endif /* __powerpc64__ && ! __ASSEMBLY__ */
 
 #if !defined(__ASSEMBLY__)
-#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+#define __read_mostly __attribute__((__section__(".read_mostly.data")))
 #endif
 
 #endif /* __KERNEL__ */
--- 0.org/include/asm-powerpc/page_64.h	Wed Jul  2 00:40:50 2008
+++ 1.fixname/include/asm-powerpc/page_64.h	Wed Jul  2 00:46:09 2008
@@ -150,7 +150,7 @@
 #else
 #define __page_aligned \
 	__attribute__((__aligned__(PAGE_SIZE), \
-		__section__(".data.page_aligned")))
+		__section__(".page_aligned.data")))
 #endif
 
 #define VM_DATA_DEFAULT_FLAGS \
--- 0.org/include/asm-powerpc/ppc_asm.h	Wed Jul  2 00:40:50 2008
+++ 1.fixname/include/asm-powerpc/ppc_asm.h	Wed Jul  2 00:44:28 2008
@@ -156,7 +156,7 @@
 GLUE(.,name):
 
 #define _INIT_GLOBAL(name) \
-	.section ".text.init.refok"; \
+	.section ".init.refok.text"; \
 	.align 2 ; \
 	.globl name; \
 	.globl GLUE(.,name); \
@@ -196,7 +196,7 @@
 GLUE(.,name):
 
 #define _INIT_STATIC(name) \
-	.section ".text.init.refok"; \
+	.section ".init.refok.text"; \
 	.align 2 ; \
 	.section ".opd","aw"; \
 name: \

                 reply	other threads:[~2008-07-02  0:39 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=200807020239.36751.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).