public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Tim Abbott <tabbott@MIT.EDU>
Cc: Linux kernel mailing list <linux-kernel@vger.kernel.org>,
	linux arch <linux-arch@vger.kernel.org>,
	Anders Kaseorg <andersk@mit.edu>
Subject: [PATCH/RFC] Sample conversion of powerpc
Date: Mon, 4 May 2009 16:30:32 +0200	[thread overview]
Message-ID: <20090504143032.GB8237@uranus.ravnborg.org> (raw)
In-Reply-To: <20090504142732.GA8237@uranus.ravnborg.org>

This is the patch to convert powerpc to the
new linker script setup.

Note that powerpc does not take benefit of all the consolidations.

	Sam

 arch/powerpc/kernel/vmlinux.lds.S |   53 +++++--------------------------------
 1 files changed, 7 insertions(+), 46 deletions(-)

diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index a047a6c..e0fef43 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -75,14 +75,8 @@ SECTIONS
 	PROVIDE32 (etext = .);
 
 	/* Read-only data */
-	RODATA
-
-	/* Exception & bug tables */
-	__ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
-		__start___ex_table = .;
-		*(__ex_table)
-		__stop___ex_table = .;
-	}
+	RO_DATA_SECTION(PAGE_SIZE)
+	EXCEPTION_TABLE(1)
 
 	NOTES :kernel :notes
 
@@ -100,11 +94,7 @@ SECTIONS
 	. = ALIGN(PAGE_SIZE);
 	__init_begin = .;
 
-	.init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
-		_sinittext = .;
-		INIT_TEXT
-		_einittext = .;
-	} :kernel
+	INIT_TEXT_SECTION(PAGE_SIZE) :kernel
 
 	/* .exit.text is discarded at runtime, not link time,
 	 * to deal with references from __bug_table
@@ -113,8 +103,10 @@ SECTIONS
 		EXIT_TEXT
 	}
 
-	.init.data : AT(ADDR(.init.data) - LOAD_OFFSET) {
-		INIT_DATA
+	INIT_DATA_SECTION(16)
+	PERCPU(PAGE_SIZE)
+
+	.init.data :  {
 		__vtop_table_begin = .;
 		*(.vtop_fixup);
 		__vtop_table_end = .;
@@ -128,27 +120,6 @@ SECTIONS
 #endif
 	}
 
-	. = ALIGN(16);
-	.init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
-		__setup_start = .;
-		*(.init.setup)
-		__setup_end = .;
-	}
-
-	.initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
-		__initcall_start = .;
-		INITCALLS
-		__initcall_end = .;
-		}
-
-	.con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
-		__con_initcall_start = .;
-		*(.con_initcall.init)
-		__con_initcall_end = .;
-	}
-
-	SECURITY_INIT
-
 	. = ALIGN(8);
 	__ftr_fixup : AT(ADDR(__ftr_fixup) - LOAD_OFFSET) {
 		__start___ftr_fixup = .;
@@ -175,15 +146,6 @@ SECTIONS
 		__stop___fw_ftr_fixup = .;
 	}
 #endif
-#ifdef CONFIG_BLK_DEV_INITRD
-	. = ALIGN(PAGE_SIZE);
-	.init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
-		__initramfs_start = .;
-		*(.init.ramfs)
-		__initramfs_end = .;
-	}
-#endif
-	PERCPU(PAGE_SIZE)
 
 	. = ALIGN(8);
 	.machine.desc : AT(ADDR(.machine.desc) - LOAD_OFFSET) {
@@ -247,7 +209,6 @@ SECTIONS
 
 	. = ALIGN(PAGE_SIZE);
 	_edata  =  .;
-	PROVIDE32 (edata = .);
 
 	/* The initial task and kernel stack */
 #ifdef CONFIG_PPC32

  reply	other threads:[~2009-05-04 14:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1241121253-32341-1-git-send-email-tabbott@mit.edu>
2009-05-01 21:31 ` [PATCH v2 0/6] macros for section name cleanup Sam Ravnborg
2009-05-02  0:48   ` Tim Abbott
2009-05-02 22:01     ` Sam Ravnborg
2009-05-04 14:27       ` Sam Ravnborg
2009-05-04 14:30         ` Sam Ravnborg [this message]
2009-05-04 16:32         ` Tim Abbott
2009-05-04 17:42           ` Mike Frysinger
2009-05-04 17:54             ` Sam Ravnborg

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=20090504143032.GB8237@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=andersk@mit.edu \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tabbott@MIT.EDU \
    /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