Re: [PATCH 6/13] maps#2: Move the page walker code to lib/

From: Andrew Morton
Date: Wed Apr 11 2007 - 03:17:43 EST


On Wed, 11 Apr 2007 16:35:44 +1000 Nick Piggin <nickpiggin@xxxxxxxxxxxx> wrote:

> Matt Mackall wrote:
> > Move the page walker code to lib/
> >
> > This lets it get shared outside of proc/ and linked in only when
> > needed.
>
> Still should go into mm/

spose so.

> If it had, you might have also noticed your pagetable walking code
> is completely different from how everyone else does it, and fixed
> that too.

Different in what way?

> BTW. Is it the case that unused and unexported symbols don't get
> pruned by the linker except inside lib/?

If they're static and unreferenced then the linker will remove them. Of
course, usually humans remove these because they generate warnings, unless
special-things happen. We deliberately do special-things with
register_cpu_notifier() so the notifier-block and the handler go away if
!CONFIG_HOTPLUG_CPU.

If the functions are non-static then yes, I expect we end up with them in
vmlinux. There are tricks we can play with -ffunction-sections to fix
that, but we don't.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/