Skip to content
Snippets Groups Projects
Commit d30def00 authored by Cupertino Miranda's avatar Cupertino Miranda
Browse files

bpf: make sure CO-RE relocs are typed with struct BTF_KIND_STRUCT

Based on observation within bpf-next selftests and comparisson of GCC
and clang compiled code, the BPF loader expects all CO-RE relocations to
point to BTF non const and non volatile type nodes.

gcc/ChangeLog:

	* btfout.cc (get_btf_kind): Remove static from function definition.
	* config/bpf/btfext-out.cc (bpf_code_reloc_add): Check if CO-RE type
	is not a const or volatile.
	* ctfc.h (btf_dtd_kind): Add prototype for function.

gcc/testsuite/ChangeLog:

	* gcc.target/bpf/core-attr-const.c: New test.
parent 8d9d5834
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment