bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH dwarves 0/2] generate BTF_KIND_TAG types from DW_TAG_LLVM_annotation dwarf tags
@ 2021-09-20  0:35 Yonghong Song
  2021-09-20  0:35 ` [PATCH dwarves 1/2] dwarf_loader: parse dwarf tag DW_TAG_LLVM_annotation Yonghong Song
  2021-09-20  0:35 ` [PATCH dwarves 2/2] btf_encoder: generate BTF_KIND_TAG from llvm annotations Yonghong Song
  0 siblings, 2 replies; 6+ messages in thread
From: Yonghong Song @ 2021-09-20  0:35 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, dwarves
  Cc: Alexei Starovoitov, Andrii Nakryiko, bpf, Daniel Borkmann,
	kernel-team, Martin KaFai Lau

LLVM has implemented btf_tag attribute ([1]) which intended
to provide a "string" tag for struct/union or its member, var,
a func or its parameter. Such a "string" tag will be encoded
in dwarf. For non-BPF target like x86_64, pahole needs to
convert those dwarf btf_tag annotations to BTF so kernel
can utilize these "string" tags for bpf program verification, etc.

Patch 1 enhanced dwarf_loader to encode DW_TAG_LLVM_annotation
tags into internal data structure and Patch 2 will encode
such information to BTF with BTF_KIND_TAGs.

 [1] https://reviews.llvm.org/D106614

Yonghong Song (2):
  dwarf_loader: parse dwarf tag DW_TAG_LLVM_annotation
  btf_encoder: generate BTF_KIND_TAG from llvm annotations

 btf_encoder.c  | 45 ++++++++++++++++++++++++++
 dwarf_loader.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++----
 dwarves.h      | 10 ++++++
 pahole.c       |  8 +++++
 4 files changed, 142 insertions(+), 6 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-09-22  1:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20  0:35 [PATCH dwarves 0/2] generate BTF_KIND_TAG types from DW_TAG_LLVM_annotation dwarf tags Yonghong Song
2021-09-20  0:35 ` [PATCH dwarves 1/2] dwarf_loader: parse dwarf tag DW_TAG_LLVM_annotation Yonghong Song
2021-09-21 21:57   ` Andrii Nakryiko
2021-09-20  0:35 ` [PATCH dwarves 2/2] btf_encoder: generate BTF_KIND_TAG from llvm annotations Yonghong Song
2021-09-21 22:02   ` Andrii Nakryiko
2021-09-22  1:16     ` Yonghong Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).