Skip to contentSkip to conversation

Why doesn't memchr appear in ksyms?

DISCUSSION Tom Dickson 2 participants 2 messages Sep 30, 2004

lore
Share & tools
lore
#0 lore raw

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

- -Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBXCwl2dxAfYNwANIRAm/RAJ0ab0hJH/8IaV9gOW7cTWe6z5E6agCgm2hu F20XzDvW3Ah5LJ/2foMxfMw=
=0qgy
-----END PGP SIGNATURE-----

#1 lore raw

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)