| 1 |
/* Test special meaning of .maps section for BTF when pruning. For global |
| 2 |
variables of struct type placed in this section, we must treat members as |
| 3 |
though they are used directly, always collecting pointee types. |
| 4 |
Therefore, full type information for struct keep_me should be emitted. */ |
| 5 |
|
| 6 |
/* { dg-do compile } */ |
| 7 |
/* { dg-options "-gbtf -gprune-btf -dA" } */ |
| 8 |
|
| 9 |
/* { dg-final { scan-assembler-not "BTF_KIND_FWD 'keep_me'" } } */ |
| 10 |
/* { dg-final { scan-assembler "BTF_KIND_STRUCT 'keep_me'" } } */ |
| 11 |
|
| 12 |
struct keep_me { |
| 13 |
int a; |
| 14 |
char c; |
| 15 |
}; |
| 16 |
|
| 17 |
struct { |
| 18 |
int *key; |
| 19 |
struct keep_me *value; |
| 20 |
} my_map __attribute__((section (".maps"))); |