1 /* 2 * Public domain. 2002, Matthieu Herrb 3 * 4 * $OpenBSD: bar.c,v 1.1 2002/02/05 21:47:23 matthieu Exp $ 5 */ 6 7 #include <stdio.h> 8 #include "elfbug.h" 9 10 int uninitialized(void)11uninitialized(void) 12 { 13 printf("uninitialized called\n"); 14 return 1; 15 } 16 17 int bar(void)18bar(void) 19 { 20 printf("bar\n"); 21 return 0; 22 } 23 24 void fooinit(void)25fooinit(void) 26 { 27 if (func == uninitialized) { 28 func = bar; 29 } 30 } 31