1 extern __thread char bar[]; 2 extern char size_of_bar asm ("bar@SIZE"); 3 4 char *bar_size_1 = &size_of_bar; 5 static char *bar_size_2 = &size_of_bar; 6 7 char * bar_size1(void)8bar_size1 (void) 9 { 10 bar[2] = 3; 11 return bar_size_1; 12 } 13 14 char * bar_size2(void)15bar_size2 (void) 16 { 17 return bar_size_2; 18 } 19 20 extern __thread char foo[]; 21 extern char size_of_foo asm ("foo@SIZE"); 22 23 char *foo_size_1 = &size_of_foo; 24 static char *foo_size_2 = &size_of_foo; 25 26 char * foo_size1(void)27foo_size1 (void) 28 { 29 foo[3] = 4; 30 return foo_size_1; 31 } 32 33 char * foo_size2(void)34foo_size2 (void) 35 { 36 return foo_size_2; 37 } 38