This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Adding a function to glibc?
- From: Hsn <almohri at gmail dot com>
- To: libc-ports at sourceware dot org
- Date: Wed, 21 Oct 2009 13:53:25 -0700 (PDT)
- Subject: Adding a function to glibc?
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 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?
--
View this message in context: http://www.nabble.com/Adding-a-function-to-glibc--tp26000075p26000075.html
Sent from the Sourceware - libc-ports mailing list archive at Nabble.com.