Skip to content

Instantly share code, notes, and snippets.

@mheffner
Created August 18, 2009 21:16
Show Gist options
  • Select an option

  • Save mheffner/169981 to your computer and use it in GitHub Desktop.

Select an option

Save mheffner/169981 to your computer and use it in GitHub Desktop.
$ gcc -g3 -Wall -fPIC -shared -o condwait_wrap.so condwait_wrap.c -ldl -lpthread -Wl,--version-script -Wl,VERSION.txt
$ LD_PRELOAD=./condwait_wrap.so ./condwait_test
Calling condwait v. 2.3.2 with cond: 0x600d80, mutex: 0x600dc0.....got it!
Thread exiting
$ objdump -t condwait_wrap.so | grep pthread_cond_wait
000000000000074a l F .text 000000000000006c pthread_cond_wait_225
00000000000007b6 l F .text 000000000000006c pthread_cond_wait_232
00000000000007b6 g F .text 000000000000006c pthread_cond_wait@@GLIBC_2.3.2
000000000000074a g F .text 000000000000006c pthread_cond_wait@GLIBC_2.2.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment