Re: Undefined symbols in 2.6.11-rc5-mm1

From: Andrew Morton
Date: Wed Mar 02 2005 - 11:33:45 EST


Adrian Bunk <bunk@xxxxxxxxx> wrote:
>
> > In lib/Makefile, remove parser.o from the lib-y: rule and add
> >
> > obj-y += parser.o
>
> This I didn't find.
>
> Is it really the intention to silently omit objects that are not
> referenced or could this be changed?

In some cases, yes, it it desirable. For example, lib/extable.c provides a
default implementation of an exception table sorter but if the architecture
defies its own, the linker will skip the default version in lib/.

At least, that's what the thinking was a few years ago. But it's such a
special-case that we can probably forget about it and just drive the build
and linkage with config now.

> Why doesn't an EXPORT_SYMBOL create a reference?

It does, but that reference is within the same compilation unit as the
definition. IOW: there are no references to the symbol which are external
to the symbol's file. There's still nothing to drag that file in.
-
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/