diff options
author | Daniel Borkmann | 2019-04-09 23:20:15 +0200 |
---|---|---|
committer | Alexei Starovoitov | 2019-04-10 02:05:47 +0200 |
commit | 817998afa038c156bbc1a6e69c48aa26282cc41f (patch) | |
tree | 0b9dd4132343ed490f7162d3ab75690304b2f722 /tools/include/linux | |
parent | bpf, libbpf: add support for BTF Var and DataSec (diff) | |
download | kernel-qcow2-linux-817998afa038c156bbc1a6e69c48aa26282cc41f.tar.gz kernel-qcow2-linux-817998afa038c156bbc1a6e69c48aa26282cc41f.tar.xz kernel-qcow2-linux-817998afa038c156bbc1a6e69c48aa26282cc41f.zip |
bpf: bpftool support for dumping data/bss/rodata sections
Add the ability to bpftool to handle BTF Var and DataSec kinds
in order to dump them out of btf_dumper_type(). The value has a
single object with the section name, which itself holds an array
of variables it dumps. A single variable is an object by itself
printed along with its name. From there further type information
is dumped along with corresponding value information.
Example output from .rodata:
# ./bpftool m d i 150
[{
"value": {
".rodata": [{
"load_static_data.bar": 18446744073709551615
},{
"num2": 24
},{
"num5": 43947
},{
"num6": 171
},{
"str0": [97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,0,0,0,0,0,0
]
},{
"struct0": {
"a": 42,
"b": 4278120431,
"c": 1229782938247303441
}
},{
"struct2": {
"a": 0,
"b": 0,
"c": 0
}
}
]
}
}
]
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/include/linux')
0 files changed, 0 insertions, 0 deletions