source:
branches/libc-0.6/testcase/weak/weaksimple.c@
2653
| Last change on this file since 2653 was 596, checked in by , 22 years ago | |
|---|---|
|
|
| File size: 323 bytes | |
| Line | |
|---|---|
| 1 | #define WEAKBSS |
| 2 | /* must be compiled with -fno-common! */ |
| 3 | |
| 4 | #ifdef WEAKBSS |
| 5 | #pragma weak weakbss |
| 6 | int weakbss; |
| 7 | #endif |
| 8 | |
| 9 | int weakdata = 1; |
| 10 | #pragma weak weakdata |
| 11 | |
| 12 | #pragma weak weaktext |
| 13 | int weaktext(void) |
| 14 | { |
| 15 | return -1; |
| 16 | } |
| 17 | |
| 18 | int main() |
| 19 | { |
| 20 | return weaktext() |
| 21 | #ifdef WEAKBSS |
| 22 | + weakbss |
| 23 | #endif |
| 24 | + weakdata; |
| 25 | } |
| 26 |
Note:
See
