[PATCH iproute2] bpf: Print section name when hitting non ld64 issue

Subsystems: library code, the rest

STALE3091d

3 messages, 3 authors, 2018-03-02 · open the first message on its own page

[PATCH iproute2] bpf: Print section name when hitting non ld64 issue

From: Joe Stringer <hidden>
Date: 2018-02-28 22:16:51

It's useful to be able to tell which section is being processed in the
ELF when this error is triggered, so print that detail.

Signed-off-by: Joe Stringer <redacted>
---
 lib/bpf.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/lib/bpf.c b/lib/bpf.c
index 2db151e4dd3c..c38d92d87759 100644
--- a/lib/bpf.c
+++ b/lib/bpf.c
@@ -2039,6 +2039,7 @@ static int bpf_apply_relo_data(struct bpf_elf_ctx *ctx,
 		    insns[ioff].code != (BPF_LD | BPF_IMM | BPF_DW)) {
 			fprintf(stderr, "ELF contains relo data for non ld64 instruction at offset %u! Compiler bug?!\n",
 				ioff);
+			fprintf(stderr, " - Current section: %s\n", data_relo->sec_name);
 			if (ioff < num_insns &&
 			    insns[ioff].code == (BPF_JMP | BPF_CALL))
 				fprintf(stderr, " - Try to annotate functions with always_inline attribute!\n");
-- 
2.14.1

Re: [PATCH iproute2] bpf: Print section name when hitting non ld64 issue

From: Daniel Borkmann <daniel@iogearbox.net>
Date: 2018-02-28 22:19:36

On 02/28/2018 11:16 PM, Joe Stringer wrote:
It's useful to be able to tell which section is being processed in the
ELF when this error is triggered, so print that detail.

Signed-off-by: Joe Stringer <redacted>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>

Re: [PATCH iproute2] bpf: Print section name when hitting non ld64 issue

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2018-03-02 21:32:40

On Wed, 28 Feb 2018 14:16:42 -0800
Joe Stringer [off-list ref] wrote:
It's useful to be able to tell which section is being processed in the
ELF when this error is triggered, so print that detail.

Signed-off-by: Joe Stringer <redacted>
Applied
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help