| 1 |
#include "../../testdata/common.h" |
| 2 |
|
| 3 |
#define tagA __attribute__((btf_decl_tag("a"))) |
| 4 |
#define tagB __attribute__((btf_decl_tag("b"))) |
| 5 |
#define tagC __attribute__((btf_decl_tag("c"))) |
| 6 |
#define tagD __attribute__((btf_decl_tag("d"))) |
| 7 |
#define tagE __attribute__((btf_decl_tag("e"))) |
| 8 |
|
| 9 |
struct s { |
| 10 |
char tagA foo; |
| 11 |
char tagB bar; |
| 12 |
} tagC; |
| 13 |
|
| 14 |
union u { |
| 15 |
char tagA foo; |
| 16 |
char tagB bar; |
| 17 |
} tagC; |
| 18 |
|
| 19 |
typedef tagB char td; |
| 20 |
|
| 21 |
struct s tagD s1; |
| 22 |
union u tagE u1; |
| 23 |
td tagA t1; |
| 24 |
|
| 25 |
int tagA tagB fwdDecl(char tagC x, char tagD y); |
| 26 |
|
| 27 |
int tagE normalDecl1(char tagB x, char tagC y) { |
| 28 |
return fwdDecl(x, y); |
| 29 |
} |
| 30 |
|
| 31 |
int tagE normalDecl2(char tagB x, char tagC y) { |
| 32 |
return fwdDecl(x, y); |
| 33 |
} |
| 34 |
|
| 35 |
__section("syscall") int prog(char *ctx) { |
| 36 |
return normalDecl1(ctx[0], ctx[1]) + normalDecl2(ctx[2], ctx[3]); |
| 37 |
} |