]> git.baikalelectronics.ru Git - kernel.git/commit
tools/libbpf: improve the pr_debug statements to contain section numbers
authorJesper Dangaard Brouer <brouer@redhat.com>
Thu, 8 Feb 2018 11:48:17 +0000 (12:48 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 8 Feb 2018 23:24:38 +0000 (00:24 +0100)
commit108eec1f8dde7db9daaf8b367db26283ab9f6223
tree9e1fbf72eea030e467249b7d4ff385b8bf476f2c
parent6a85bf9c0ad5623d84a8dcd05c13cc6f621a0ae0
tools/libbpf: improve the pr_debug statements to contain section numbers

While debugging a bpf ELF loading issue, I needed to correlate the
ELF section number with the failed relocation section reference.
Thus, add section numbers/index to the pr_debug.

In debug mode, also print section that were skipped.  This helped
me identify that a section (.eh_frame) was skipped, and this was
the reason the relocation section (.rel.eh_frame) could not find
that section number.

The section numbers corresponds to the readelf tools Section Headers [Nr].

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/lib/bpf/libbpf.c