mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] section name cleanup for h8300
@ 2009-04-30 23:46 Tim Abbott
  2009-04-30 23:46 ` [PATCH 1/2] h8300: use new macros for .data.init_task Tim Abbott
  0 siblings, 1 reply; 3+ messages in thread
From: Tim Abbott @ 2009-04-30 23:46 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Linux kernel mailing list, Anders Kaseorg, Waseem Daher,
	Denys Vlasenko, Jeff Arnold, Yoshinori Sato, Tim Abbott

This patch series cleans up the section names on the h8300
architecture.  It requires the architecture-independent macro
definitions from this patch series:

<http://www.spinics.net/lists/mips/msg33499.html>

The long-term goal here is to add support for building the kernel with
-ffunction-sections -fdata-sections.  This requires renaming all the
magic section names in the kernel of the form .text.foo, .data.foo,
.bss.foo, and .rodata.foo to not have collisions with sections
generated for code like:

static int nosave = 0; /* -fdata-sections places in .data.nosave */
static void head(); /* -ffunction-sections places in .text.head */

Note that these patches have not been boot-tested (aside from testing
the analogous changes on x86), since I don't have access to the
appropriate hardware.

	-Tim Abbott


Tim Abbott (2):
  h8300: use new macros for .data.init_task.
  h8300: use .head.text for compressed bootloader.

 arch/h8300/boot/compressed/head.S      |    3 ++-
 arch/h8300/boot/compressed/vmlinux.lds |    2 +-
 arch/h8300/kernel/init_task.c          |    3 +--
 arch/h8300/kernel/vmlinux.lds.S        |    3 +--
 4 files changed, 5 insertions(+), 6 deletions(-)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] h8300: use new macros for .data.init_task.
  2009-04-30 23:46 [PATCH 0/2] section name cleanup for h8300 Tim Abbott
@ 2009-04-30 23:46 ` Tim Abbott
  2009-04-30 23:46   ` [PATCH 2/2] h8300: use .head.text for compressed bootloader Tim Abbott
  0 siblings, 1 reply; 3+ messages in thread
From: Tim Abbott @ 2009-04-30 23:46 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Linux kernel mailing list, Anders Kaseorg, Waseem Daher,
	Denys Vlasenko, Jeff Arnold, Yoshinori Sato, Tim Abbott

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
---
 arch/h8300/kernel/init_task.c   |    3 +--
 arch/h8300/kernel/vmlinux.lds.S |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/h8300/kernel/init_task.c b/arch/h8300/kernel/init_task.c
index cb5dc55..b90e371 100644
--- a/arch/h8300/kernel/init_task.c
+++ b/arch/h8300/kernel/init_task.c
@@ -35,7 +35,6 @@ EXPORT_SYMBOL(init_task);
  * way process stacks are handled. This is done by having a special
  * "init_task" linker map entry..
  */
-union thread_union init_thread_union
-	__attribute__((__section__(".data.init_task"))) =
+union thread_union init_thread_union __init_task_data =
 		{ INIT_THREAD_INFO(init_task) };
 
diff --git a/arch/h8300/kernel/vmlinux.lds.S b/arch/h8300/kernel/vmlinux.lds.S
index 43a87b9..33a562c 100644
--- a/arch/h8300/kernel/vmlinux.lds.S
+++ b/arch/h8300/kernel/vmlinux.lds.S
@@ -100,8 +100,7 @@ SECTIONS
 	__sdata = . ;
 	___data_start = . ;
 
-	. = ALIGN(0x2000) ;
-		*(.data.init_task)
+		INIT_TASK_DATA(0x2000)
 	. = ALIGN(0x4) ;
 		DATA_DATA
 	. = ALIGN(0x4) ;
-- 
1.6.2.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] h8300: use .head.text for compressed bootloader.
  2009-04-30 23:46 ` [PATCH 1/2] h8300: use new macros for .data.init_task Tim Abbott
@ 2009-04-30 23:46   ` Tim Abbott
  0 siblings, 0 replies; 3+ messages in thread
From: Tim Abbott @ 2009-04-30 23:46 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Linux kernel mailing list, Anders Kaseorg, Waseem Daher,
	Denys Vlasenko, Jeff Arnold, Yoshinori Sato, Tim Abbott

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
---
 arch/h8300/boot/compressed/head.S      |    3 ++-
 arch/h8300/boot/compressed/vmlinux.lds |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/h8300/boot/compressed/head.S b/arch/h8300/boot/compressed/head.S
index 985a81a..a821a1b 100644
--- a/arch/h8300/boot/compressed/head.S
+++ b/arch/h8300/boot/compressed/head.S
@@ -5,11 +5,12 @@
  */
 
 	.h8300h
+#include <linux/init.h>
 #include <linux/linkage.h>
 
 #define SRAM_START 0xff4000
 
-	.section	.text.startup
+	__HEAD
 	.global	startup
 startup:
 	mov.l	#SRAM_START+0x8000, sp
diff --git a/arch/h8300/boot/compressed/vmlinux.lds b/arch/h8300/boot/compressed/vmlinux.lds
index 65e2a0d..98a492e 100644
--- a/arch/h8300/boot/compressed/vmlinux.lds
+++ b/arch/h8300/boot/compressed/vmlinux.lds
@@ -4,7 +4,7 @@ SECTIONS
         {
         __stext = . ;
 	__text = .;
-	       *(.text.startup)
+	       *(.head.text)
 	       *(.text)
         __etext = . ;
         }
-- 
1.6.2.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-05-01  0:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-30 23:46 [PATCH 0/2] section name cleanup for h8300 Tim Abbott
2009-04-30 23:46 ` [PATCH 1/2] h8300: use new macros for .data.init_task Tim Abbott
2009-04-30 23:46   ` [PATCH 2/2] h8300: use .head.text for compressed bootloader Tim Abbott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®