Re: [PATCH 8/9] um: fix strrchr problems

From: Al Viro
Date: Mon Aug 29 2011 - 18:11:29 EST


On Mon, Aug 29, 2011 at 02:27:05PM -0700, Andrew Morton wrote:

> z:/usr/src/linux-3.1-rc4> grep -r kernel_strrchr .
> z:/usr/src/linux-3.1-rc4>
>
> ok, I give up. How does this work?

You are grepping for the wrong thing ;-) It works the same way defines
next to it do - both the kernel and libc define functions with the
same name (doing the same thing) and we get problems when linking.

See the comment right before it:

# -Dvmap=kernel_vmap prevents anything from referencing the libpcap.o symbol so
# named - it's a common symbol in libpcap, so we get a binary which crashes.
#
# Same things for in6addr_loopback and mktime - found in libc. For these two we
# only get link-time error, luckily.
#
# These apply to USER_CFLAGS to.

--
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/