netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2] bpf: Print section name when hitting non ld64 issue
@ 2018-02-28 22:16 Joe Stringer
  2018-02-28 22:19 ` Daniel Borkmann
  2018-03-02 21:32 ` Stephen Hemminger
  0 siblings, 2 replies; 3+ messages in thread
From: Joe Stringer @ 2018-02-28 22:16 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, daniel

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 <joe@wand.net.nz>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH iproute2] bpf: Print section name when hitting non ld64 issue
  2018-02-28 22:16 [PATCH iproute2] bpf: Print section name when hitting non ld64 issue Joe Stringer
@ 2018-02-28 22:19 ` Daniel Borkmann
  2018-03-02 21:32 ` Stephen Hemminger
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Borkmann @ 2018-02-28 22:19 UTC (permalink / raw)
  To: Joe Stringer, Stephen Hemminger; +Cc: netdev

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 <joe@wand.net.nz>

Acked-by: Daniel Borkmann <daniel@iogearbox.net>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH iproute2] bpf: Print section name when hitting non ld64 issue
  2018-02-28 22:16 [PATCH iproute2] bpf: Print section name when hitting non ld64 issue Joe Stringer
  2018-02-28 22:19 ` Daniel Borkmann
@ 2018-03-02 21:32 ` Stephen Hemminger
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2018-03-02 21:32 UTC (permalink / raw)
  To: Joe Stringer; +Cc: netdev, daniel

On Wed, 28 Feb 2018 14:16:42 -0800
Joe Stringer <joe@wand.net.nz> 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 <joe@wand.net.nz>

Applied

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-02 21:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-28 22:16 [PATCH iproute2] bpf: Print section name when hitting non ld64 issue Joe Stringer
2018-02-28 22:19 ` Daniel Borkmann
2018-03-02 21:32 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).