linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm: use unified discard definition in linker script
@ 2009-10-07 10:08 Alan Jenkins
  0 siblings, 0 replies; 4+ messages in thread
From: Alan Jenkins @ 2009-10-07 10:08 UTC (permalink / raw)
  To: linux-arm-kernel

Commit 023bf6f "linker script: unify usage of discard definition"
changed the linker scripts for all architectures except for ARM.
I can find no discussion about this exception, so here are the changes
for ARM.

These changes are exactly parallel to the ia64 case.

"ia64 is notable because it first throws away some ia64 specific
 subsections and then include the rest of the sections into the final
 image, so those sections must be discarded before the inclusion."

Not boot-tested.  In build testing, the modified linker script generated
an identical vmlinux file.


[I would like to be able to rely on this unified discard definition.
 I want to sort the kernel symbol tables to allow faster symbol
 resolution during module loading. The simplest way appears to be
 to generate sorted versions from vmlinux.o, link them in to vmlinux,
 _and discard the original unsorted tables_.

 This work is driven by my x86 netbook, but it is implemented at a
 generic level. It is possible it will benefit some ARM systems also.]


Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
CC: Tejun Heo <tj@kernel.org>
---
 arch/arm/kernel/vmlinux.lds.S |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index aecf87d..ec511d4 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -79,11 +79,11 @@ SECTIONS
 #endif
 	}
 
-	/DISCARD/ : {			/* Exit code and data		*/
-		EXIT_TEXT
-		EXIT_DATA
-		*(.exitcall.exit)
-		*(.discard)
+	/*
+	 * unwind exit sections must be discarded before the rest of the
+	 * unwind sections get included.
+	 */
+	/DISCARD/ : {
 		*(.ARM.exidx.exit.text)
 		*(.ARM.extab.exit.text)
 #ifndef CONFIG_HOTPLUG_CPU
@@ -271,6 +271,9 @@ SECTIONS
 	.stab.index 0 : { *(.stab.index) }
 	.stab.indexstr 0 : { *(.stab.indexstr) }
 	.comment 0 : { *(.comment) }
+
+	/* Default discards */
+	DISCARDS
 }
 
 /*
-- 
1.6.3.2

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

* [PATCH] arm: use unified discard definition in linker script
@ 2009-10-07 10:29 Alan Jenkins
  2009-10-07 10:41 ` Tejun Heo
  2009-10-07 11:23 ` Russell King - ARM Linux
  0 siblings, 2 replies; 4+ messages in thread
From: Alan Jenkins @ 2009-10-07 10:29 UTC (permalink / raw)
  To: linux-arm-kernel

I selfishly request an Acked-by for the following. My aim is to submit it as
part of a larger series ("module: Speed up symbol resolution during module
loading") which would not go through the ARM tree.

------------------------------------------------------------------->

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

* [PATCH] arm: use unified discard definition in linker script
  2009-10-07 10:29 [PATCH] arm: use unified discard definition in linker script Alan Jenkins
@ 2009-10-07 10:41 ` Tejun Heo
  2009-10-07 11:23 ` Russell King - ARM Linux
  1 sibling, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2009-10-07 10:41 UTC (permalink / raw)
  To: linux-arm-kernel

Alan Jenkins wrote:
> I selfishly request an Acked-by for the following. My aim is to submit it as
> part of a larger series ("module: Speed up symbol resolution during module
> loading") which would not go through the ARM tree.
> 
> ------------------------------------------------------------------->
> From 52c4a00b22fecf3ecb352618356bb61f7f4b261b Mon Sep 17 00:00:00 2001
> From: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
> Date: Wed, 7 Oct 2009 11:08:34 +0100
> Subject: [PATCH] arm: use unified discard definition in linker script
> 
> Commit 023bf6f "linker script: unify usage of discard definition"
> changed the linker scripts for all architectures except for ARM.
> I can find no discussion about this exception, so here are the changes
> for ARM.
> 
> These changes are exactly parallel to the ia64 case.
> 
> "ia64 is notable because it first throws away some ia64 specific
>  subsections and then include the rest of the sections into the final
>  image, so those sections must be discarded before the inclusion."
> 
> Not boot-tested.  In build testing, the modified linker script generated
> an identical vmlinux file.
> 
> 
> [I would like to be able to rely on this unified discard definition.
>  I want to sort the kernel symbol tables to allow faster symbol
>  resolution during module loading. The simplest way appears to be
>  to generate sorted versions from vmlinux.o, link them in to vmlinux,
>  _and discard the original unsorted tables_.
> 
>  This work is driven by my x86 netbook, but it is implemented at a
>  generic level. It is possible it will benefit some ARM systems also.]
> 
> 
> Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
> CC: Tejun Heo <tj@kernel.org>

Most likely omission by simple mistake.  The change looks fine to me
but I don't have any arm machine to test it.

Acked-by-without-testing: Tejun Heo <tj@kernel.org>

-- 
tejun

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

* [PATCH] arm: use unified discard definition in linker script
  2009-10-07 10:29 [PATCH] arm: use unified discard definition in linker script Alan Jenkins
  2009-10-07 10:41 ` Tejun Heo
@ 2009-10-07 11:23 ` Russell King - ARM Linux
  1 sibling, 0 replies; 4+ messages in thread
From: Russell King - ARM Linux @ 2009-10-07 11:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 07, 2009 at 11:29:08AM +0100, Alan Jenkins wrote:
> I selfishly request an Acked-by for the following. My aim is to submit it as
> part of a larger series ("module: Speed up symbol resolution during module
> loading") which would not go through the ARM tree.

Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>

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

end of thread, other threads:[~2009-10-07 11:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-07 10:29 [PATCH] arm: use unified discard definition in linker script Alan Jenkins
2009-10-07 10:41 ` Tejun Heo
2009-10-07 11:23 ` Russell King - ARM Linux
  -- strict thread matches above, loose matches on Subject: below --
2009-10-07 10:08 Alan Jenkins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).