This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Issues in adding a new API function in pthread


I have some questions in modifying pthread library in the glibc-2.3.4.
In order to modify and add new functions in the pthread library, I
installed glibc.xxx.src.rpm, modify sources, build glibc.xxx.rpm, and
finally reinstall them.
I checked out that the modified function works on my machine, but I
have trouble exporting API's. For example, I made
pthread_mutex_lock2.c file, and it contains pthread_mutex_lock2()
dummy function that always return 0. I modified Versions, Makefiles,
libpthread.abilist, etc, but I made a compile error in calling
pthread_mutex_lock2 function from the application that use the new
pthread library.

Error messages are like this.

> # gcc d.c -o d -lpthread
> /tmp/ccaCOjbR.o(.text+0x179): In function `main':
> : undefined reference to `pthread_mutex_lock2'
> collect2: ld returned 1 exit status

I checked whether the libpthread.so and pthread.h files are updated,
and confirmed that they are updated.
Can I get any idea or reference website?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]