OLD | NEW |
1 /* pr 13484 */ | 1 /* pr 13484 */ |
2 | 2 |
3 #include <stdio.h> | 3 #include <stdio.h> |
4 | 4 |
5 int x; | 5 int x; |
6 | 6 |
7 void foo() | 7 void foo() |
8 { | 8 { |
9 x++; | 9 x++; |
10 printf("This is foo\n"); | 10 printf("This is foo\n"); |
11 } | 11 } |
12 | 12 |
13 int main() | 13 int main() |
14 { | 14 { |
15 #ifdef usestubs | |
16 set_debug_traps (); | |
17 breakpoint (); | |
18 #endif | |
19 foo(); | 15 foo(); |
20 return 0; | 16 return 0; |
21 } | 17 } |
22 | 18 |
23 /* Ensure the new file will have more sections. It may exploit code not | 19 /* Ensure the new file will have more sections. It may exploit code not |
24 updating its SECTION_COUNT on reread_symbols. */ | 20 updating its SECTION_COUNT on reread_symbols. */ |
25 | 21 |
26 #ifndef NO_SECTIONS | 22 #ifndef NO_SECTIONS |
27 # define VAR0(n) __attribute__ ((section ("sect" #n))) int var##n; | 23 # define VAR0(n) __attribute__ ((section ("sect" #n))) int var##n; |
28 # define VAR1(n) VAR0 (n ## 0) VAR0(n ## 1) VAR0(n ## 2) VAR0(n ## 3) | 24 # define VAR1(n) VAR0 (n ## 0) VAR0(n ## 1) VAR0(n ## 2) VAR0(n ## 3) |
29 # define VAR2(n) VAR1 (n ## 0) VAR1(n ## 1) VAR1(n ## 2) VAR1(n ## 3) | 25 # define VAR2(n) VAR1 (n ## 0) VAR1(n ## 1) VAR1(n ## 2) VAR1(n ## 3) |
30 # define VAR3(n) VAR2 (n ## 0) VAR2(n ## 1) VAR2(n ## 2) VAR2(n ## 3) | 26 # define VAR3(n) VAR2 (n ## 0) VAR2(n ## 1) VAR2(n ## 2) VAR2(n ## 3) |
31 VAR3 (0) | 27 VAR3 (0) |
32 #endif | 28 #endif |
OLD | NEW |