-
- Downloads
bpf: avoid issues with CO-RE and -gtoggle
Compiling a BPF program with CO-RE relocations (and BTF) while also passing -gtoggle led to an inconsistent state where CO-RE support was enabled but BTF would not be generated, and this was not caught by the existing option parsing. This led to an ICE when generating the CO-RE relocation info, since BTF is required for CO-RE. Update bpf_option_override to avoid this case, and add a few tests for the interactions of these options. gcc/ * config/bpf/bpf.cc (bpf_option_override): Improve handling of CO-RE options to avoid issues with -gtoggle. gcc/testsuite/ * gcc.target/bpf/core-options-1.c: New test. * gcc.target/bpf/core-options-2.c: Likewise. * gcc.target/bpf/core-options-3.c: Likewise.
Showing
- gcc/config/bpf/bpf.cc 5 additions, 2 deletionsgcc/config/bpf/bpf.cc
- gcc/testsuite/gcc.target/bpf/core-options-1.c 15 additions, 0 deletionsgcc/testsuite/gcc.target/bpf/core-options-1.c
- gcc/testsuite/gcc.target/bpf/core-options-2.c 14 additions, 0 deletionsgcc/testsuite/gcc.target/bpf/core-options-2.c
- gcc/testsuite/gcc.target/bpf/core-options-3.c 5 additions, 0 deletionsgcc/testsuite/gcc.target/bpf/core-options-3.c
Please register or sign in to comment