OSDN Git Service

libbpf: Fix dumping big-endian bitfields
authorIlya Leoshkevich <iii@linux.ibm.com>
Wed, 13 Oct 2021 16:09:00 +0000 (18:09 +0200)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 20 Oct 2021 18:40:01 +0000 (11:40 -0700)
commitc9e982b879465ca74e3593ce82808aa259265a71
tree2d6ad1683185134022b06fd4af2aa7fa75dbb198
parentb16d12f3900283e00aded9131ba1e9b2880513c3
libbpf: Fix dumping big-endian bitfields

On big-endian arches not only bytes, but also bits are numbered in
reverse order (see e.g. S/390 ELF ABI Supplement, but this is also true
for other big-endian arches as well).

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211013160902.428340-3-iii@linux.ibm.com
tools/lib/bpf/btf_dump.c