From: Andrii Nakryiko <andrii@kernel.org>
To: <bpf@vger.kernel.org>, <netdev@vger.kernel.org>, <ast@fb.com>,
<daniel@iogearbox.net>
Cc: <andrii@kernel.org>, <kernel-team@fb.com>
Subject: [PATCH v2 bpf-next 1/6] bpftool: strip const/volatile/restrict modifiers from .bss and .data vars
Date: Fri, 23 Apr 2021 11:53:52 -0700 [thread overview]
Message-ID: <20210423185357.1992756-2-andrii@kernel.org> (raw)
In-Reply-To: <20210423185357.1992756-1-andrii@kernel.org>
Similarly to .rodata, strip any const/volatile/restrict modifiers when
generating BPF skeleton. They are not helpful and actually just get in the way.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
---
tools/bpf/bpftool/gen.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c
index 31ade77f5ef8..440a2fcb6441 100644
--- a/tools/bpf/bpftool/gen.c
+++ b/tools/bpf/bpftool/gen.c
@@ -106,8 +106,10 @@ static int codegen_datasec_def(struct bpf_object *obj,
if (strcmp(sec_name, ".data") == 0) {
sec_ident = "data";
+ strip_mods = true;
} else if (strcmp(sec_name, ".bss") == 0) {
sec_ident = "bss";
+ strip_mods = true;
} else if (strcmp(sec_name, ".rodata") == 0) {
sec_ident = "rodata";
strip_mods = true;
--
2.30.2
next prev parent reply other threads:[~2021-04-23 18:54 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 18:53 [PATCH v2 bpf-next 0/6] BPF static linker: support static vars and maps Andrii Nakryiko
2021-04-23 18:53 ` Andrii Nakryiko [this message]
2021-04-23 20:02 ` [PATCH v2 bpf-next 1/6] bpftool: strip const/volatile/restrict modifiers from .bss and .data vars Yonghong Song
2021-04-23 18:53 ` [PATCH v2 bpf-next 2/6] libbpf: rename static variables during linking Andrii Nakryiko
2021-04-23 20:24 ` Yonghong Song
2021-04-23 21:38 ` Andrii Nakryiko
2021-04-23 21:56 ` Yonghong Song
2021-04-23 23:05 ` Alexei Starovoitov
2021-04-23 23:26 ` Yonghong Song
2021-04-23 23:35 ` Alexei Starovoitov
2021-04-23 23:35 ` Andrii Nakryiko
2021-04-23 23:48 ` Alexei Starovoitov
2021-04-24 0:13 ` Andrii Nakryiko
2021-04-24 0:22 ` Alexei Starovoitov
2021-04-26 15:44 ` Andrii Nakryiko
2021-04-26 22:34 ` Alexei Starovoitov
2021-04-26 23:11 ` Andrii Nakryiko
2021-04-27 2:22 ` Alexei Starovoitov
2021-04-27 21:27 ` Andrii Nakryiko
2021-04-28 4:55 ` Alexei Starovoitov
2021-04-28 19:33 ` Andrii Nakryiko
2021-05-04 4:42 ` bpf libraries and static variables. Was: " Alexei Starovoitov
2021-05-05 5:22 ` Alexei Starovoitov
2021-05-06 22:54 ` Daniel Borkmann
2021-05-11 17:57 ` Andrii Nakryiko
2021-05-11 18:05 ` Andrii Nakryiko
2021-05-11 14:20 ` Lorenz Bauer
2021-05-11 18:04 ` Andrii Nakryiko
2021-05-11 18:59 ` Andrii Nakryiko
2021-05-11 23:05 ` Alexei Starovoitov
2021-05-12 13:40 ` Lorenz Bauer
2021-05-12 18:50 ` Andrii Nakryiko
2021-05-12 23:39 ` Alexei Starovoitov
2021-05-13 8:37 ` Lorenz Bauer
2021-05-13 15:41 ` Alexei Starovoitov
2021-04-24 2:36 ` Yonghong Song
2021-04-26 15:45 ` Andrii Nakryiko
2021-04-26 16:34 ` Yonghong Song
2021-04-23 18:53 ` [PATCH v2 bpf-next 3/6] libbpf: support static map definitions Andrii Nakryiko
2021-04-23 20:25 ` Yonghong Song
2021-04-23 18:53 ` [PATCH v2 bpf-next 4/6] bpftool: handle transformed static map names in BPF skeleton Andrii Nakryiko
2021-04-23 22:59 ` Yonghong Song
2021-04-23 18:53 ` [PATCH v2 bpf-next 5/6] selftests/bpf: extend linked_vars selftests with static variables Andrii Nakryiko
2021-04-23 23:03 ` Yonghong Song
2021-04-23 23:03 ` Yonghong Song
2021-04-23 18:53 ` [PATCH v2 bpf-next 6/6] selftests/bpf: extend linked_maps selftests with static maps Andrii Nakryiko
2021-04-23 23:11 ` Yonghong Song
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=20210423185357.1992756-2-andrii@kernel.org \
--to=andrii@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).