Adding a function to glibc?
Almohri, Hussain
almohri@gmail.com
Wed Oct 21 22:45:00 GMT 2009
I'm doing some tests on glibc. I'd like to add new functions to it. For a
test, I create a file and put a simple function putct in it and just for
testing I put it in stdlib folder.
I added the function name to the routines section of the Makefile. In the
header file stdlib/stdlib.h, I added this line: extern int putct(int c);
I also added the function in stdlib/Versions
I run make and make install. Everything was OK. But when I write a sample
program to test this function, gcc says:
/tmp/ccq6R9BD.o: In function `main':
test.c:(.text+0x11): undefined reference to `putct'
collect2: ld returned 1 exit status
I already pointed to the modified library when running gcc.
Can somebody help me with this?
--
Hussain Almohri
More information about the Libc-help
mailing list