@@ -12,7 +12,7 @@ SYNOPSIS
**bpftool** [*OPTIONS*] **prog** *COMMAND*
- *OPTIONS* := { { **-j** | **--json** } [{ **-p** | **--pretty** }] | { **-f** | **--bpffs** } }
+ *OPTIONS* := { { **-j** | **--json** } [{ **-p** | **--pretty** }] | { **-f** | **--bpffs** } | {**--metadata**} }
*COMMANDS* :=
{ **show** | **list** | **dump xlated** | **dump jited** | **pin** | **load**
@@ -80,6 +80,9 @@ DESCRIPTION
programs. On such kernels bpftool will automatically emit this
information as well.
+ You can specify **--metadata** option to pretty-print
+ read-only data from the associated *.metadata* section.
+
**bpftool prog dump xlated** *PROG* [{ **file** *FILE* | **opcodes** | **visual** | **linum** }]
Dump eBPF instructions of the programs from the kernel. By
default, eBPF will be disassembled and printed to standard
@@ -2005,7 +2005,7 @@ static int do_help(int argc, char **argv)
}
fprintf(stderr,
- "Usage: %1$s %2$s { show | list } [PROG]\n"
+ "Usage: %1$s %2$s { show | list } [PROG] [--metadata]\n"
" %1$s %2$s dump xlated PROG [{ file FILE | opcodes | visual | linum }]\n"
" %1$s %2$s dump jited PROG [{ file FILE | opcodes | linum }]\n"
" %1$s %2$s pin PROG FILE\n"
Mention --metadata in the rst documentation and in the prog.c help. Cc: YiFei Zhu <zhuyifei1999@gmail.com> Signed-off-by: Stanislav Fomichev <sdf@google.com> --- tools/bpf/bpftool/Documentation/bpftool-prog.rst | 5 ++++- tools/bpf/bpftool/prog.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-)