Re: Why doesn't memchr appear in ksyms?

From: Randy.Dunlap
Date: Thu Sep 30 2004 - 11:08:57 EST


On Thu, 30 Sep 2004 08:54:13 -0700 Tom Dickson wrote:

| -----BEGIN PGP SIGNED MESSAGE-----
| Hash: SHA1
|
| According to
| http://kernelnewbies.org/documents/kdoc/kernel-api/r1708.html I should
| be able to use memchr in a module, however, when I try to load the
| module insmod complains that memchr is not available; a grep memchr
| /proc/ksyms shows that it doesn't exist.
|
| Is there some special kernel option I have to set to enable it? memcpy
| and other mem* externs are there.
|
| Thank you (for answering a simple question)
|
| Kernel 2.4.26 on a Pentium 3 system

memchr() is compiled/built inline, not as an exported function.

If it's not working for you, maybe you aren't building with "-O2"
(gcc optimization level 2), which is needed for kernel builds.


--
~Randy
MOTD: Always include version info.
(Again. Sometimes I think ln -s /usr/src/linux/.config .signature)
-
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/