Re: crc32 and lib.a (was Re: [PATCH] nbd in 2.5.3 does not

Petr Vandrovec (VANDROVE@vc.cvut.cz)
Thu, 31 Jan 2002 21:27:35 +0100


On 31 Jan 02 at 13:47, Jeff Garzik wrote:
> On Thu, Jan 31, 2002 at 02:24:46PM +0100, Petr Vandrovec wrote:
> > I've got strange idea and tried to build diskless machine around
> > 2.5.3... Besides problem with segfaulting crc32 (it is initialized after
> > net/ipv4/ipconfig.c due to lib/lib.a being a library... I had to hardcode
> > lib/crc32.o before --start-group in main Makefile, but it is another
> > story)
>
> Would you be willing to cook up a patch for this problem?
>
> I ran into this too. It was solved by setting CONFIG_CRC32=n and
> letting the Makefile rules pull it in... but lib/lib.a needs to be
> lib/lib.o really.

Unfortunately during conversion I found that there is lib/bust_spinlocks.c,
which is always included in lib.a, is always compiled, even if architecture
provides its own bust_spinlocks function.

As no other module in lib/ uses module_init() initalization, it looks
to me like that we should move crc32.c from lib/ to kernel/, instead of
turning lib.a into lib.o.

But of course if there is consensus that I should convert lib/lib.a
into lib/lib.o, I can either create Config.in symbol
CONFIG_NEED_GENERIC_BUST_SPINLOCK, or add HAVE_ARCH_BUST_SPINLOCK #define
into some of i386, ia64, mips64, s390 and s390x architecture dependent
headers.
Thanks,
Petr Vandrovec
vandrove@vc.cvut.cz

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/