howdy.c 286 B

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