Thread (126 messages) 126 messages, 10 authors, 2011-02-18
STALE5589d

[PATCH 03/14] ARM: v6k: remove CPU_32v6K dependencies in asm/spinlock.h

From: nico@fluxnic.net (Nicolas Pitre)
Date: 2011-01-26 15:42:41
Also in: linux-omap

On Wed, 26 Jan 2011, Dave Martin wrote:
On Tue, Jan 25, 2011 at 9:21 PM, Nicolas Pitre [off-list ref] wrote:
quoted
On Tue, 25 Jan 2011, Russell King - ARM Linux wrote:
quoted
Hmm, actually it looks like you can end up with configurations where the
spinlocks are inlined.

That means we'll have to get rid of the link-time discarding of the
.exit sections, and discard them along with the .init sections.
... but only when CONFIG_SMP_ON_UP=y.
Do we need to consider any other discarded sections?  In vmlinux.lds, I have:

 /* Default discards */
 /DISCARD/ : { *(.exit.text) *(.cpuexit.text) *(.memexit.text)
*(.exit.data) *(.cpuexit.data) *(.cpuexit.rodata) *(.memexit.data)
*(.memexit.rodata) *(.exitcall.exit) *(.discard) *(.discard.*) }


Alternatively, I wonder .alt.smp.init could make weak references
instead of normal references: then if the referenced section is
discarded, the reference will revert to 0 and the fixup code can
ignore it (at the expense of wasting a bit of space in the fixup table
... but it's no worse than the current situation).  From
experimentation, it seems this doesn't work if the referenced symbol
is defined in the same file, since the linker resolves the reference
before discarding sections, but maybe there's a way around it...
That's strange.  How can the linker resolve the reference if the 
referenced symbol is not in the same section as the reference source?  
What happens when the final link completes?


Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help