[PATCH 03/14] ARM: v6k: remove CPU_32v6K dependencies in asm/spinlock.h
Nicolas Pitre
nico at fluxnic.net
Wed Jan 26 10:42:41 EST 2011
On Wed, 26 Jan 2011, Dave Martin wrote:
> On Tue, Jan 25, 2011 at 9:21 PM, Nicolas Pitre <nicolas.pitre at linaro.org> wrote:
> > On Tue, 25 Jan 2011, Russell King - ARM Linux wrote:
> >
> >> 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
More information about the linux-arm-kernel
mailing list