From 0a2bd52f1a903060a7b305b429aa71fb68995bb7 Mon Sep 17 00:00:00 2001 From: David Faust Date: Tue, 3 Aug 2021 10:04:10 -0700 Subject: btf: expose get_btf_id Expose the function get_btf_id, so that it may be used by the BPF backend. This enables the BPF CO-RE machinery in the BPF backend to lookup BTF type IDs, in order to create CO-RE relocation records. A prototype is added in ctfc.h gcc/ChangeLog: * btfout.c (get_btf_id): Function is no longer static. * ctfc.h: Expose it here. --- gcc/ctfc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/ctfc.h') diff --git a/gcc/ctfc.h b/gcc/ctfc.h index 14180c1..a0b7e41 100644 --- a/gcc/ctfc.h +++ b/gcc/ctfc.h @@ -431,6 +431,7 @@ extern int ctf_add_variable (ctf_container_ref, const char *, ctf_id_t, dw_die_ref, unsigned int); extern ctf_id_t ctf_lookup_tree_type (ctf_container_ref, const tree); +extern ctf_id_t get_btf_id (ctf_id_t); /* CTF section does not emit location information; at this time, location information is needed for BTF CO-RE use-cases. */ -- cgit v1.1