howdy.c 459 B

123456789101112131415161718192021222324
  1. #include <pthread.h>
  2. #include <stdio.h>
  3. extern int __pthread_return_0 (void);
  4. int howdy(const char *s)
  5. {
  6. return printf("howdy: __pthread_return_0 = %p\n"
  7. "howdy: pthread_cond_signal = %p\n",
  8. __pthread_return_0, pthread_cond_signal);
  9. }
  10. void __attribute__((constructor)) howdy_ctor(void)
  11. {
  12. printf("I am the libhowdy constructor!\n");
  13. }
  14. void __attribute__((destructor)) howdy_dtor(void)
  15. {
  16. printf("I am the libhowdy destructor!\n");
  17. }