public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] m68knommu: missing sections for linker script
@ 2008-05-07  0:52 Greg Ungerer
  2008-05-11  0:41 ` Sam Ravnborg
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Ungerer @ 2008-05-07  0:52 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, gerg, linux-kernel

Inlucde the missing kcrctab and kcrctab_unused sections into the
m68knommu linker script.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---

diff -Naurp linux-2.6.25-rc1/arch/m68knommu/kernel/vmlinux.lds.S linux-2.6.25-rc1-uc0/arch/m68knommu/kernel/vmlinux.lds.S
--- linux-2.6.25-rc1/arch/m68knommu/kernel/vmlinux.lds.S	2008-05-06 14:52:00.000000000 +1000
+++ linux-2.6.25-rc1-uc0/arch/m68knommu/kernel/vmlinux.lds.S	2008-05-06 16:56:47.000000000 +1000
@@ -114,6 +114,16 @@ SECTIONS {
 		*(__kcrctab_gpl)
 		__stop___kcrctab_gpl = .;
 
+		/* Kernel symbol table: Normal unused symbols */
+		__start___kcrctab_unused = .;
+		*(__kcrctab_unused)
+		__stop___kcrctab_unused = .;
+
+		/* Kernel symbol table: GPL-only unused symbols */
+		__start___kcrctab_unused_gpl = .;
+		*(__kcrctab_unused_gpl)
+		__stop___kcrctab_unused_gpl = .;
+
 		/* Kernel symbol table: GPL-future symbols */
 		__start___kcrctab_gpl_future = .;
 		*(__kcrctab_gpl_future)

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

* Re: [PATCH] m68knommu: missing sections for linker script
  2008-05-07  0:52 [PATCH] m68knommu: missing sections for linker script Greg Ungerer
@ 2008-05-11  0:41 ` Sam Ravnborg
  2008-05-11 23:03   ` Sebastian Siewior
  2008-05-12  5:22   ` Greg Ungerer
  0 siblings, 2 replies; 5+ messages in thread
From: Sam Ravnborg @ 2008-05-11  0:41 UTC (permalink / raw)
  To: Greg Ungerer; +Cc: torvalds, akpm, gerg, linux-kernel

On Wed, May 07, 2008 at 10:52:39AM +1000, Greg Ungerer wrote:
> Inlucde the missing kcrctab and kcrctab_unused sections into the
> m68knommu linker script.
> 
> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
> ---
> 
> diff -Naurp linux-2.6.25-rc1/arch/m68knommu/kernel/vmlinux.lds.S linux-2.6.25-rc1-uc0/arch/m68knommu/kernel/vmlinux.lds.S
> --- linux-2.6.25-rc1/arch/m68knommu/kernel/vmlinux.lds.S	2008-05-06 14:52:00.000000000 +1000
> +++ linux-2.6.25-rc1-uc0/arch/m68knommu/kernel/vmlinux.lds.S	2008-05-06 16:56:47.000000000 +1000
> @@ -114,6 +114,16 @@ SECTIONS {
>  		*(__kcrctab_gpl)
>  		__stop___kcrctab_gpl = .;
>  
> +		/* Kernel symbol table: Normal unused symbols */
> +		__start___kcrctab_unused = .;
> +		*(__kcrctab_unused)
> +		__stop___kcrctab_unused = .;
> +
> +		/* Kernel symbol table: GPL-only unused symbols */
> +		__start___kcrctab_unused_gpl = .;
> +		*(__kcrctab_unused_gpl)
> +		__stop___kcrctab_unused_gpl = .;
> +
>  		/* Kernel symbol table: GPL-future symbols */
>  		__start___kcrctab_gpl_future = .;
>  		*(__kcrctab_gpl_future)

Hi Greg.

Any specific reasons why m68knommu does
not use include/asm-generic/vmlinux-lds.h?

There are defined there as well as many other common things.

	Sam

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

* Re: [PATCH] m68knommu: missing sections for linker script
  2008-05-11  0:41 ` Sam Ravnborg
@ 2008-05-11 23:03   ` Sebastian Siewior
  2008-06-07 11:03     ` Sam Ravnborg
  2008-05-12  5:22   ` Greg Ungerer
  1 sibling, 1 reply; 5+ messages in thread
From: Sebastian Siewior @ 2008-05-11 23:03 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Greg Ungerer, torvalds, akpm, gerg, linux-kernel

* Sam Ravnborg | 2008-05-11 02:41:07 [+0200]:

>Any specific reasons why m68knommu does
>not use include/asm-generic/vmlinux-lds.h?
Yes, binutils syntax. I made a patch that changes vmlinux-lds a little
to make it work with the generic one. I posted it to uclinux ml and wait
for Greg's feedback (whether here is fine with this approach). I can
recall that he wanted to use the generic if possible. Here is the patch
so you drop an eye on it.

>
>	Sam
Sebastian
---

From: Sebastian Siewior <bigeasy@linutronix.de>
Subject: [PATCH] generic: add OUTPUT_DATA_SECTION to vmlinux.lds.h

the m68k compiler requires an information in which memory location
this section belongs. Something like

|       .data DATA_ADDR : {
|                 . = ALIGN(4);
|                 _sdata = . ;
|                 DATA_DATA
|                 . = ALIGN(8192) ;
|                 *(.data.init_task)
|                 _edata = . ;
|         } > DATA
|

is used where DATA is defined as something like
| MEMORY {
|         DATA     : ORIGIN = RAM_START, LENGTH = RAM_LENGTH
| }

and RAM_START & RAM_LENGTH is comming from Kconfig and describes
the memory.
With this patch the arch specific vmlinux.lds.S could get a little
smaller and requires less updates cycles (after adding new section
to the kernel).

Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
---
 include/asm-generic/vmlinux.lds.h |   43 ++++++++++++++++++++----------------
 1 files changed, 24 insertions(+), 19 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index f054778..4f1feae 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -6,6 +6,10 @@
 #define VMLINUX_SYMBOL(_sym_) _sym_
 #endif
 
+#ifndef OUTPUT_DATA_SECTION
+#define OUTPUT_DATA_SECTION
+#endif
+
 /* Align . to a 8 byte boundary equals to maximum function alignment. */
 #define ALIGN_FUNCTION()  . = ALIGN(8)
 
@@ -61,11 +65,11 @@
 		*(.rodata) *(.rodata.*)					\
 		*(__vermagic)		/* Kernel version magic */	\
 		*(__markers_strings)	/* Markers: strings */		\
-	}								\
+	} OUTPUT_DATA_SECTION						\
 									\
 	.rodata1          : AT(ADDR(.rodata1) - LOAD_OFFSET) {		\
 		*(.rodata1)						\
-	}								\
+	} OUTPUT_DATA_SECTION						\
 									\
 	/* PCI quirks */						\
 	.pci_fixup        : AT(ADDR(.pci_fixup) - LOAD_OFFSET) {	\
@@ -84,89 +88,89 @@
 		VMLINUX_SYMBOL(__start_pci_fixups_resume) = .;		\
 		*(.pci_fixup_resume)					\
 		VMLINUX_SYMBOL(__end_pci_fixups_resume) = .;		\
-	}								\
+	} OUTPUT_DATA_SECTION						\
 									\
 	/* RapidIO route ops */						\
 	.rio_route        : AT(ADDR(.rio_route) - LOAD_OFFSET) {	\
 		VMLINUX_SYMBOL(__start_rio_route_ops) = .;		\
 		*(.rio_route_ops)					\
 		VMLINUX_SYMBOL(__end_rio_route_ops) = .;		\
-	}								\
+	} OUTPUT_DATA_SECTION						\
 									\
 	/* Kernel symbol table: Normal symbols */			\
 	__ksymtab         : AT(ADDR(__ksymtab) - LOAD_OFFSET) {		\
 		VMLINUX_SYMBOL(__start___ksymtab) = .;			\
 		*(__ksymtab)						\
 		VMLINUX_SYMBOL(__stop___ksymtab) = .;			\
-	}								\
+	} OUTPUT_DATA_SECTION						\
 									\
 	/* Kernel symbol table: GPL-only symbols */			\
 	__ksymtab_gpl     : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) {	\
 		VMLINUX_SYMBOL(__start___ksymtab_gpl) = .;		\
 		*(__ksymtab_gpl)					\
 		VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .;		\
-	}								\
+	} OUTPUT_DATA_SECTION						\
 									\
 	/* Kernel symbol table: Normal unused symbols */		\
 	__ksymtab_unused  : AT(ADDR(__ksymtab_unused) - LOAD_OFFSET) {	\
 		VMLINUX_SYMBOL(__start___ksymtab_unused) = .;		\
 		*(__ksymtab_unused)					\
 		VMLINUX_SYMBOL(__stop___ksymtab_unused) = .;		\
-	}								\
+	} OUTPUT_DATA_SECTION						\
 									\
 	/* Kernel symbol table: GPL-only unused symbols */		\
 	__ksymtab_unused_gpl : AT(ADDR(__ksymtab_unused_gpl) - LOAD_OFFSET) { \
 		VMLINUX_SYMBOL(__start___ksymtab_unused_gpl) = .;	\
 		*(__ksymtab_unused_gpl)					\
 		VMLINUX_SYMBOL(__stop___ksymtab_unused_gpl) = .;	\
-	}								\
+	} OUTPUT_DATA_SECTION						\
 									\
 	/* Kernel symbol table: GPL-future-only symbols */		\
 	__ksymtab_gpl_future : AT(ADDR(__ksymtab_gpl_future) - LOAD_OFFSET) { \
 		VMLINUX_SYMBOL(__start___ksymtab_gpl_future) = .;	\
 		*(__ksymtab_gpl_future)					\
 		VMLINUX_SYMBOL(__stop___ksymtab_gpl_future) = .;	\
-	}								\
+	} OUTPUT_DATA_SECTION						\
 									\
 	/* Kernel symbol table: Normal symbols */			\
 	__kcrctab         : AT(ADDR(__kcrctab) - LOAD_OFFSET) {		\
 		VMLINUX_SYMBOL(__start___kcrctab) = .;			\
 		*(__kcrctab)						\
 		VMLINUX_SYMBOL(__stop___kcrctab) = .;			\
-	}								\
+	} OUTPUT_DATA_SECTION						\
 									\
 	/* Kernel symbol table: GPL-only symbols */			\
 	__kcrctab_gpl     : AT(ADDR(__kcrctab_gpl) - LOAD_OFFSET) {	\
 		VMLINUX_SYMBOL(__start___kcrctab_gpl) = .;		\
 		*(__kcrctab_gpl)					\
 		VMLINUX_SYMBOL(__stop___kcrctab_gpl) = .;		\
-	}								\
+	} OUTPUT_DATA_SECTION						\
 									\
 	/* Kernel symbol table: Normal unused symbols */		\
 	__kcrctab_unused  : AT(ADDR(__kcrctab_unused) - LOAD_OFFSET) {	\
 		VMLINUX_SYMBOL(__start___kcrctab_unused) = .;		\
 		*(__kcrctab_unused)					\
 		VMLINUX_SYMBOL(__stop___kcrctab_unused) = .;		\
-	}								\
+	} OUTPUT_DATA_SECTION						\
 									\
 	/* Kernel symbol table: GPL-only unused symbols */		\
 	__kcrctab_unused_gpl : AT(ADDR(__kcrctab_unused_gpl) - LOAD_OFFSET) { \
 		VMLINUX_SYMBOL(__start___kcrctab_unused_gpl) = .;	\
 		*(__kcrctab_unused_gpl)					\
 		VMLINUX_SYMBOL(__stop___kcrctab_unused_gpl) = .;	\
-	}								\
+	} OUTPUT_DATA_SECTION						\
 									\
 	/* Kernel symbol table: GPL-future-only symbols */		\
 	__kcrctab_gpl_future : AT(ADDR(__kcrctab_gpl_future) - LOAD_OFFSET) { \
 		VMLINUX_SYMBOL(__start___kcrctab_gpl_future) = .;	\
 		*(__kcrctab_gpl_future)					\
 		VMLINUX_SYMBOL(__stop___kcrctab_gpl_future) = .;	\
-	}								\
+	} OUTPUT_DATA_SECTION						\
 									\
 	/* Kernel symbol table: strings */				\
         __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) {	\
 		*(__ksymtab_strings)					\
-	}								\
+	} OUTPUT_DATA_SECTION						\
 									\
 	/* __*init sections */						\
 	__init_rodata : AT(ADDR(__init_rodata) - LOAD_OFFSET) {		\
@@ -177,7 +181,7 @@
 		CPU_KEEP(exit.rodata)					\
 		MEM_KEEP(init.rodata)					\
 		MEM_KEEP(exit.rodata)					\
-	}								\
+	} OUTPUT_DATA_SECTION						\
 									\
 	/* Built-in module parameters. */				\
 	__param : AT(ADDR(__param) - LOAD_OFFSET) {			\
@@ -186,7 +190,8 @@
 		VMLINUX_SYMBOL(__stop___param) = .;			\
 		. = ALIGN((align));					\
 		VMLINUX_SYMBOL(__end_rodata) = .;			\
-	}								\
+	} OUTPUT_DATA_SECTION						\
+									\
 	. = ALIGN((align));
 
 /* RODATA provided for backward compatibility.
@@ -316,7 +321,7 @@
 		__start___bug_table = .;				\
 		*(__bug_table)						\
 		__stop___bug_table = .;					\
-	}
+	} OUTPUT_DATA_SECTION
 
 #define NOTES								\
 	.notes : AT(ADDR(.notes) - LOAD_OFFSET) {			\
@@ -350,5 +355,5 @@
 	.data.percpu  : AT(ADDR(.data.percpu) - LOAD_OFFSET) {		\
 		*(.data.percpu)						\
 		*(.data.percpu.shared_aligned)				\
-	}								\
+	} OUTPUT_DATA_SECTION						\
 	__per_cpu_end = .;
-- 
1.5.4.3


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

* Re: [PATCH] m68knommu: missing sections for linker script
  2008-05-11  0:41 ` Sam Ravnborg
  2008-05-11 23:03   ` Sebastian Siewior
@ 2008-05-12  5:22   ` Greg Ungerer
  1 sibling, 0 replies; 5+ messages in thread
From: Greg Ungerer @ 2008-05-12  5:22 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: torvalds, akpm, linux-kernel

Hi Sam,

Sam Ravnborg wrote:
> On Wed, May 07, 2008 at 10:52:39AM +1000, Greg Ungerer wrote:
>> Inlucde the missing kcrctab and kcrctab_unused sections into the
>> m68knommu linker script.
>>
>> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
>> ---
>>
>> diff -Naurp linux-2.6.25-rc1/arch/m68knommu/kernel/vmlinux.lds.S linux-2.6.25-rc1-uc0/arch/m68knommu/kernel/vmlinux.lds.S
>> --- linux-2.6.25-rc1/arch/m68knommu/kernel/vmlinux.lds.S	2008-05-06 14:52:00.000000000 +1000
>> +++ linux-2.6.25-rc1-uc0/arch/m68knommu/kernel/vmlinux.lds.S	2008-05-06 16:56:47.000000000 +1000
>> @@ -114,6 +114,16 @@ SECTIONS {
>>  		*(__kcrctab_gpl)
>>  		__stop___kcrctab_gpl = .;
>>  
>> +		/* Kernel symbol table: Normal unused symbols */
>> +		__start___kcrctab_unused = .;
>> +		*(__kcrctab_unused)
>> +		__stop___kcrctab_unused = .;
>> +
>> +		/* Kernel symbol table: GPL-only unused symbols */
>> +		__start___kcrctab_unused_gpl = .;
>> +		*(__kcrctab_unused_gpl)
>> +		__stop___kcrctab_unused_gpl = .;
>> +
>>  		/* Kernel symbol table: GPL-future symbols */
>>  		__start___kcrctab_gpl_future = .;
>>  		*(__kcrctab_gpl_future)
> 
> Hi Greg.
> 
> Any specific reasons why m68knommu does
> not use include/asm-generic/vmlinux-lds.h?
> 
> There are defined there as well as many other common things.

I would very much like to use the common defines in vmlinux-lds.h.

And historically it goes back to wanting to be able to directly
build ROM based kernels. There has been a couple of threads on
this over th years, this one http://lkml.org/lkml/2003/1/21/213
touches on it. I think there is more before this too, but I couldn't
find a link to it just now.

Sebastians patch in this thread goes to resolving this. I haven't
had a good look over it yet though.

Regards
Greg



------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg@snapgear.com
Secure Computing Corporation                PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com

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

* Re: [PATCH] m68knommu: missing sections for linker script
  2008-05-11 23:03   ` Sebastian Siewior
@ 2008-06-07 11:03     ` Sam Ravnborg
  0 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2008-06-07 11:03 UTC (permalink / raw)
  To: Sebastian Siewior; +Cc: Greg Ungerer, torvalds, akpm, gerg, linux-kernel

On Mon, May 12, 2008 at 01:03:21AM +0200, Sebastian Siewior wrote:
> * Sam Ravnborg | 2008-05-11 02:41:07 [+0200]:
> 
> >Any specific reasons why m68knommu does
> >not use include/asm-generic/vmlinux-lds.h?
> Yes, binutils syntax. I made a patch that changes vmlinux-lds a little
> to make it work with the generic one. I posted it to uclinux ml and wait
> for Greg's feedback (whether here is fine with this approach). I can
> recall that he wanted to use the generic if possible. Here is the patch
> so you drop an eye on it.
> 
> >
> >	Sam
> Sebastian
> ---
> 
> From: Sebastian Siewior <bigeasy@linutronix.de>
> Subject: [PATCH] generic: add OUTPUT_DATA_SECTION to vmlinux.lds.h

Looks good Sebastian.
I have this one applied and I assume you or Greg will folloup
with the m68knommu simplification.

	Sam

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

end of thread, other threads:[~2008-06-07 11:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-07  0:52 [PATCH] m68knommu: missing sections for linker script Greg Ungerer
2008-05-11  0:41 ` Sam Ravnborg
2008-05-11 23:03   ` Sebastian Siewior
2008-06-07 11:03     ` Sam Ravnborg
2008-05-12  5:22   ` Greg Ungerer

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