mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] LDSCRIPT: Name INIT_RAM_FS consistently
@ 2009-06-22 14:32 David Howells
  2009-06-22 14:32 ` [PATCH 2/2] MN10300: Fix the vmlinux ldscript David Howells
  2009-06-22 20:32 ` [PATCH 1/2] LDSCRIPT: Name INIT_RAM_FS consistently Sam Ravnborg
  0 siblings, 2 replies; 3+ messages in thread
From: David Howells @ 2009-06-22 14:32 UTC (permalink / raw)
  To: torvalds, akpm; +Cc: linux-am33-list, linux-kernel, David Howells, Sam Ravnborg

In asm-generic/vmlinux.lds.h, name INIT_RAM_FS consistently, no matter the
setting of CONFIG_BLK_DEV_INITRD.  This corrects:

	commit ef53dae8658cf0e93d380983824a661067948d87
	Author: Sam Ravnborg <sam@ravnborg.org>
	Date:   Sun Jun 7 20:46:37 2009 +0200
	Subject: Improve vmlinux.lds.h support for arch specific linker scripts

Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
---

 include/asm-generic/vmlinux.lds.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 55413e5..92b73b6 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -625,7 +625,7 @@
 	*(.init.ramfs)							\
 	VMLINUX_SYMBOL(__initramfs_end) = .;
 #else
-#define INITRAMFS
+#define INIT_RAM_FS
 #endif
 
 /**


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

* [PATCH 2/2] MN10300: Fix the vmlinux ldscript
  2009-06-22 14:32 [PATCH 1/2] LDSCRIPT: Name INIT_RAM_FS consistently David Howells
@ 2009-06-22 14:32 ` David Howells
  2009-06-22 20:32 ` [PATCH 1/2] LDSCRIPT: Name INIT_RAM_FS consistently Sam Ravnborg
  1 sibling, 0 replies; 3+ messages in thread
From: David Howells @ 2009-06-22 14:32 UTC (permalink / raw)
  To: torvalds, akpm; +Cc: linux-am33-list, linux-kernel, David Howells

Fix the MN10300 vmlinux ldscript.  It needs to use various macros from
asm-generic/vmlinux.lds.h to correctly include all that it needs to.

Signed-off-by: David Howells <dhowells@redhat.com>
---

 arch/mn10300/kernel/vmlinux.lds.S |   60 ++++++++++---------------------------
 1 files changed, 16 insertions(+), 44 deletions(-)


diff --git a/arch/mn10300/kernel/vmlinux.lds.S b/arch/mn10300/kernel/vmlinux.lds.S
index 24de6b9..bcebcef 100644
--- a/arch/mn10300/kernel/vmlinux.lds.S
+++ b/arch/mn10300/kernel/vmlinux.lds.S
@@ -38,14 +38,10 @@ SECTIONS
 
   _etext = .;			/* End of text section */
 
-  . = ALIGN(16);		/* Exception table */
-  __start___ex_table = .;
-  __ex_table : { *(__ex_table) }
-  __stop___ex_table = .;
-
+  EXCEPTION_TABLE(16)
   BUG_TABLE
 
-  RODATA
+  RO_DATA(PAGE_SIZE)
 
   /* writeable */
   .data : {			/* Data */
@@ -53,27 +49,19 @@ SECTIONS
 	CONSTRUCTORS
 	}
 
-  . = ALIGN(PAGE_SIZE);
-  __nosave_begin = .;
-  .data_nosave : { *(.data.nosave) }
-  . = ALIGN(PAGE_SIZE);
-  __nosave_end = .;
-
-  . = ALIGN(PAGE_SIZE);
-  .data.page_aligned : { *(.data.idt) }
+  .data_nosave : { NOSAVE_DATA; }
 
-  . = ALIGN(32);
-  .data.cacheline_aligned : { *(.data.cacheline_aligned) }
+  .data.page_aligned : { PAGE_ALIGNED_DATA(PAGE_SIZE); }
+  .data.cacheline_aligned : { CACHELINE_ALIGNED_DATA(32); }
 
   /* rarely changed data like cpu maps */
   . = ALIGN(32);
   .data.read_mostly : AT(ADDR(.data.read_mostly)) {
-	*(.data.read_mostly)
+	READ_MOSTLY_DATA(32);
 	_edata = .;		/* End of data section */
   }
 
-  . = ALIGN(THREAD_SIZE);	/* init_task */
-  .data.init_task : { *(.data.init_task) }
+  .data.init_task : { INIT_TASK(THREAD_SIZE); }
 
   /* might get freed after init */
   . = ALIGN(PAGE_SIZE);
@@ -88,23 +76,18 @@ SECTIONS
   __init_begin = .;
   .init.text : {
 	_sinittext = .;
-	*(.init.text)
+	INIT_TEXT;
 	_einittext = .;
   }
-  .init.data : { *(.init.data) }
-  . = ALIGN(16);
-  __setup_start = .;
-  .setup.init : { KEEP(*(.init.setup)) }
-  __setup_end = .;
+  .init.data : { INIT_DATA; }
+  .setup.init : { INIT_SETUP(16); }
 
   __initcall_start = .;
   .initcall.init : {
 	INITCALLS
   }
   __initcall_end = .;
-  __con_initcall_start = .;
-  .con_initcall.init : { *(.con_initcall.init) }
-  __con_initcall_end = .;
+  .con_initcall.init : { CON_INITCALL; }
 
   SECURITY_INIT
   . = ALIGN(4);
@@ -114,28 +97,17 @@ SECTIONS
  .altinstr_replacement : { *(.altinstr_replacement) }
   /* .exit.text is discard at runtime, not link time, to deal with references
      from .altinstructions and .eh_frame */
-  .exit.text : { *(.exit.text) }
-  .exit.data : { *(.exit.data) }
+	.exit.text : { EXIT_TEXT; }
+	.exit.data : { EXIT_DATA; }
 
-#ifdef CONFIG_BLK_DEV_INITRD
-  . = ALIGN(PAGE_SIZE);
-  __initramfs_start = .;
-  .init.ramfs : { *(.init.ramfs) }
-  __initramfs_end = .;
-#endif
+  .init.ramfs : { INIT_RAM_FS; }
 
   PERCPU(32)
   . = ALIGN(PAGE_SIZE);
   __init_end = .;
   /* freed after init ends here */
 
-  __bss_start = .;		/* BSS */
-  .bss : {
-	*(.bss.page_aligned)
-	*(.bss)
-  }
-  . = ALIGN(4);
-  __bss_stop = .;
+  BSS(4)
 
   _end = . ;
 
@@ -145,7 +117,7 @@ SECTIONS
 
   /* Sections to be discarded */
   /DISCARD/ : {
-	*(.exitcall.exit)
+	EXIT_CALL
 	}
 
   STABS_DEBUG


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

* Re: [PATCH 1/2] LDSCRIPT: Name INIT_RAM_FS consistently
  2009-06-22 14:32 [PATCH 1/2] LDSCRIPT: Name INIT_RAM_FS consistently David Howells
  2009-06-22 14:32 ` [PATCH 2/2] MN10300: Fix the vmlinux ldscript David Howells
@ 2009-06-22 20:32 ` Sam Ravnborg
  1 sibling, 0 replies; 3+ messages in thread
From: Sam Ravnborg @ 2009-06-22 20:32 UTC (permalink / raw)
  To: David Howells; +Cc: torvalds, akpm, linux-am33-list, linux-kernel

On Mon, Jun 22, 2009 at 03:32:31PM +0100, David Howells wrote:
> In asm-generic/vmlinux.lds.h, name INIT_RAM_FS consistently, no matter the
> setting of CONFIG_BLK_DEV_INITRD.  This corrects:
> 
> 	commit ef53dae8658cf0e93d380983824a661067948d87
> 	Author: Sam Ravnborg <sam@ravnborg.org>
> 	Date:   Sun Jun 7 20:46:37 2009 +0200
> 	Subject: Improve vmlinux.lds.h support for arch specific linker scripts
> 
> Signed-off-by: David Howells <dhowells@redhat.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>
Thanks for fixing this!

Acked-by: Sam Ravnborg <sam@ravnborg.org>

	Sam

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

end of thread, other threads:[~2009-06-22 20:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-22 14:32 [PATCH 1/2] LDSCRIPT: Name INIT_RAM_FS consistently David Howells
2009-06-22 14:32 ` [PATCH 2/2] MN10300: Fix the vmlinux ldscript David Howells
2009-06-22 20:32 ` [PATCH 1/2] LDSCRIPT: Name INIT_RAM_FS consistently Sam Ravnborg

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®