aboutsummaryrefslogtreecommitdiff
path: root/gcc/btfout.c
diff options
context:
space:
mode:
authorDavid Faust <david.faust@oracle.com>2021-08-03 10:04:10 -0700
committerDavid Faust <david.faust@oracle.com>2021-09-07 13:48:58 -0700
commit0a2bd52f1a903060a7b305b429aa71fb68995bb7 (patch)
treeadaea23bfd6fef27dbaeee897a78341377a9958b /gcc/btfout.c
parent5b723401b37332df0e2a665c4124d52c9ca7a515 (diff)
downloadgcc-0a2bd52f1a903060a7b305b429aa71fb68995bb7.zip
gcc-0a2bd52f1a903060a7b305b429aa71fb68995bb7.tar.gz
gcc-0a2bd52f1a903060a7b305b429aa71fb68995bb7.tar.bz2
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.
Diffstat (limited to 'gcc/btfout.c')
-rw-r--r--gcc/btfout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/btfout.c b/gcc/btfout.c
index 8cdd990..cdc6c63 100644
--- a/gcc/btfout.c
+++ b/gcc/btfout.c
@@ -156,7 +156,7 @@ init_btf_id_map (size_t len)
/* Return the BTF type ID of CTF type ID KEY, or BTF_INVALID_TYPEID if the CTF
type with ID KEY does not map to a BTF type. */
-static inline ctf_id_t
+ctf_id_t
get_btf_id (ctf_id_t key)
{
return btf_id_map[key];