[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
pthread_atfork is "hidden" -- bug or feature?
- From: paul parasoft com (Paul Pluzhnikov)
- To: phil-list redhat com
- Subject: pthread_atfork is "hidden" -- bug or feature?
- Date: Wed, 19 Feb 2003 09:46:02 -0800
Gentlemen,
On all RH releases prior to the Phoebe, pthread_atfork is "exposed":
$ objdump -T /lib/i686/libpthread.so.0 | grep pthread_atfork
00007520 g DF .text 000000ed GLIBC_2.0 __pthread_atfork
00007520 g DF .text 000000ed GLIBC_2.0 pthread_atfork
On Phoebe (nptl-20021219.tar.bz2) pthread_atfork is hidden:
$ objdump -T /lib/i686/libpthread.so.0 | grep pthread_atfork
000067a0 g DF .text 00000046 (GLIBC_2.0) pthread_atfork
This is visible at the user level as the test case below demonstrates.
Is this a bug or a feature?
Thanks,
--
Paul Pluzhnikov paul parasoft com
--- cut ---
/* compile with
gcc -D_GNU_SOURCE -g dlatfork.c -pthread -ldl
*/
#include <dlfcn.h>
#include <stdio.h>
#include <pthread.h>
int main(int argc, char *argv[])
{
void *f = dlsym(RTLD_NEXT, "pthread_atfork");
printf("&pthread_atfork = 0x%08x\n", &pthread_atfork);
printf("dlsym(RTLD_NEXT, \"pthread_atfork\") = 0x%08x\n", f);
return 0;
}
--- cut ---
## output on RH-8.0 ##
&pthread_atfork = 0x0804832c
dlsym(RTLD_NEXT, "pthread_atfork") = 0x4002d520
## output on Phoebe ##
&pthread_atfork = 0x0804832c
dlsym(RTLD_NEXT, "pthread_atfork") = 0x00000000
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]