mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] Linker script cleanup for avr32
@ 2009-09-16 16:40 Tim Abbott
  2009-09-16 16:40 ` [PATCH v2] avr32: clean up linker script using standard macros Tim Abbott
  0 siblings, 1 reply; 2+ messages in thread
From: Tim Abbott @ 2009-09-16 16:40 UTC (permalink / raw)
  To: Haavard Skinnemoen; +Cc: linux-kernel, Sam Ravnborg, Tim Abbott

This is an updated version of the patch series I sent in late July
cleaning up the avr32 architecture's linker scripts.  The only change is
that it is rebased on top of Linus's current master.

This cross-architecture linker script cleanup project is in
preparation for adding support for building the kernel with
-ffunction-sections -fdata-sections, which is a prerequisite for
Ksplice.

Nelson Elhage (1):
  avr32: clean up linker script using standard macros.

 arch/avr32/kernel/vmlinux.lds.S |   64 +++++---------------------------------
 1 files changed, 9 insertions(+), 55 deletions(-)


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

* [PATCH v2] avr32: clean up linker script using standard macros.
  2009-09-16 16:40 [PATCH v2] Linker script cleanup for avr32 Tim Abbott
@ 2009-09-16 16:40 ` Tim Abbott
  0 siblings, 0 replies; 2+ messages in thread
From: Tim Abbott @ 2009-09-16 16:40 UTC (permalink / raw)
  To: Haavard Skinnemoen
  Cc: linux-kernel, Sam Ravnborg, Nelson Elhage, Tim Abbott,
	Haavard Skinnemoen

From: Nelson Elhage <nelhage@ksplice.com>

As a side effect, this patch changes the .init.ramfs data to be
PAGE_SIZE-aligned, instead of 32-byte aligned.  Also, the init data is
moved into its own output sections rather than the .init output
section.

There should be no other changes to the resulting vmlinux as a result
of this patch.

Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
---
 arch/avr32/kernel/vmlinux.lds.S |   64 +++++---------------------------------
 1 files changed, 9 insertions(+), 55 deletions(-)

diff --git a/arch/avr32/kernel/vmlinux.lds.S b/arch/avr32/kernel/vmlinux.lds.S
index c4b5665..9cd2bd9 100644
--- a/arch/avr32/kernel/vmlinux.lds.S
+++ b/arch/avr32/kernel/vmlinux.lds.S
@@ -39,30 +39,10 @@ SECTIONS
 		__tagtable_begin = .;
 			*(.taglist.init)
 		__tagtable_end = .;
-			INIT_DATA
-		. = ALIGN(16);
-		__setup_start = .;
-			*(.init.setup)
-		__setup_end = .;
-		. = ALIGN(4);
-		__initcall_start = .;
-			INITCALLS
-		__initcall_end = .;
-		__con_initcall_start = .;
-			*(.con_initcall.init)
-		__con_initcall_end = .;
-		__security_initcall_start = .;
-			*(.security_initcall.init)
-		__security_initcall_end = .;
-#ifdef CONFIG_BLK_DEV_INITRD
-		. = ALIGN(32);
-		__initramfs_start = .;
-			*(.init.ramfs)
-		__initramfs_end = .;
-#endif
-		. = ALIGN(PAGE_SIZE);
-		__init_end = .;
 	}
+	INIT_DATA_SECTION(16)
+	. = ALIGN(PAGE_SIZE);
+	__init_end = .;
 
 	.text		: AT(ADDR(.text) - LOAD_OFFSET) {
 		_evba = .;
@@ -78,34 +58,16 @@ SECTIONS
 		_etext = .;
 	} = 0xd703d703
 
-	. = ALIGN(4);
-	__ex_table	: AT(ADDR(__ex_table) - LOAD_OFFSET) {
-		__start___ex_table = .;
-		*(__ex_table)
-		__stop___ex_table = .;
-	}
-
+	EXCEPTION_TABLE(4)
 	RODATA
 
-	. = ALIGN(THREAD_SIZE);
-
 	.data		: AT(ADDR(.data) - LOAD_OFFSET) {
 		_data = .;
 		_sdata = .;
-		/*
-		 * First, the init task union, aligned to an 8K boundary.
-		 */
-		*(.data.init_task)
 
-		/* Then, the page-aligned data */
-		. = ALIGN(PAGE_SIZE);
-		*(.data.page_aligned)
-
-		/* Then, the cacheline aligned data */
-		. = ALIGN(L1_CACHE_BYTES);
-		*(.data.cacheline_aligned)
-
-		/* And the rest... */
+		INIT_TASK_DATA(THREAD_SIZE)
+		PAGE_ALIGNED_DATA(PAGE_SIZE);
+		CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
 		*(.data.rel*)
 		DATA_DATA
 		CONSTRUCTORS
@@ -113,16 +75,8 @@ SECTIONS
 		_edata = .;
 	}
 
-
-	. = ALIGN(8);
-	.bss    	: AT(ADDR(.bss) - LOAD_OFFSET) {
-		__bss_start = .;
-		*(.bss)
-		*(COMMON)
-		. = ALIGN(8);
-		__bss_stop = .;
-		_end = .;
-	}
+	BSS_SECTION(0, 8, 8)
+	_end = .;
 
 	DWARF_DEBUG
 
-- 
1.6.3.3


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

end of thread, other threads:[~2009-09-16 16:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-16 16:40 [PATCH v2] Linker script cleanup for avr32 Tim Abbott
2009-09-16 16:40 ` [PATCH v2] avr32: clean up linker script using standard macros 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®