BPF List
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andriin@fb.com>
To: <bpf@vger.kernel.org>, <netdev@vger.kernel.org>, <ast@fb.com>,
	<daniel@iogearbox.net>
Cc: <andrii.nakryiko@gmail.com>, <kernel-team@fb.com>,
	Andrii Nakryiko <andriin@fb.com>
Subject: [PATCH bpf-next 1/6] selftests/bpf: ensure no DWARF relocations for BPF object files
Date: Sat, 16 Nov 2019 23:08:02 -0800	[thread overview]
Message-ID: <20191117070807.251360-2-andriin@fb.com> (raw)
In-Reply-To: <20191117070807.251360-1-andriin@fb.com>

Add -mattr=dwarfris attribute to llc to avoid having relocations against DWARF
data. These relocations make it impossible to inspect DWARF contents: all
strings are invalid.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
---
 tools/testing/selftests/bpf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index b03dc2298fea..5737888cd6a7 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -161,7 +161,7 @@ $(OUTPUT)/flow_dissector_load.o: flow_dissector_load.h
 define CLANG_BPF_BUILD_RULE
 	($(CLANG) $3 -O2 -target bpf -emit-llvm				\
 		-c $1 -o - || echo "BPF obj compilation failed") | 	\
-	$(LLC) -march=bpf -mcpu=probe $4 -filetype=obj -o $2
+	$(LLC) -mattr=dwarfris -march=bpf -mcpu=probe $4 -filetype=obj -o $2
 endef
 # Similar to CLANG_BPF_BUILD_RULE, but using native Clang and bpf LLC
 define CLANG_NATIVE_BPF_BUILD_RULE
-- 
2.17.1


  reply	other threads:[~2019-11-17  7:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-17  7:08 [PATCH bpf-next 0/6] Add libbpf-provided extern variables support Andrii Nakryiko
2019-11-17  7:08 ` Andrii Nakryiko [this message]
2019-11-17  7:08 ` [PATCH bpf-next 2/6] libbpf: refactor relocation handling Andrii Nakryiko
2019-11-17  7:08 ` [PATCH bpf-next 3/6] libbpf: fix various errors and warning reported by checkpatch.pl Andrii Nakryiko
2019-11-17  7:08 ` [PATCH bpf-next 4/6] libbpf: support initialized global variables Andrii Nakryiko
2019-11-17  7:08 ` [PATCH bpf-next 5/6] libbpf: support libbpf-provided extern variables Andrii Nakryiko
2019-11-19  3:21   ` Alexei Starovoitov
2019-11-19  6:57     ` Andrii Nakryiko
2019-11-19 15:42       ` Andrii Nakryiko
2019-11-19 15:58         ` Alexei Starovoitov
2019-11-19 23:32           ` Daniel Borkmann
2019-11-20  3:17             ` Andrii Nakryiko
2019-11-20  3:44           ` Andrii Nakryiko
2019-11-20 21:39             ` Alexei Starovoitov
2019-11-20 22:47               ` Andrii Nakryiko
2019-11-21  0:18                 ` Alexei Starovoitov
2019-11-21  2:13                   ` Andrii Nakryiko
2019-11-21  4:39                     ` Alexei Starovoitov
2019-11-17  7:08 ` [PATCH bpf-next 6/6] selftests/bpf: add tests for libbpf-provided externs Andrii Nakryiko
2019-11-17  7:12 ` [PATCH bpf-next 0/6] Add libbpf-provided extern variables support Andrii Nakryiko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191117070807.251360-2-andriin@fb.com \
    --to=andriin@fb.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=ast@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox