test/testfiles_for_readelf/loongarch-relocs.c
raw| 1 | /* This source was compiled for LoongArch64. |
| 2 | loongarch64-unknown-linux-gnu-gcc -c -o loongarch64-relocs.o.elf loongarch-relocs.c -g |
| 3 | Upstream support for LoongArch32 is not yet mature, so it is not covered. |
| 4 | */ |
| 5 | |
| 6 | extern struct { |
| 7 | int i, j; |
| 8 | } data; |
| 9 | |
| 10 | extern int bar (void); |
| 11 | |
| 12 | int |
| 13 | foo (int a) |
| 14 | { |
| 15 | data.i += a; |
| 16 | data.j -= bar(); |
| 17 | return 0; |
| 18 | } |