From: Eduard Zingerman <eddyz87@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: dwarves@vger.kernel.org, arnaldo.melo@gmail.com,
bpf@vger.kernel.org, kernel-team@fb.com, ast@kernel.org,
daniel@iogearbox.net, andrii@kernel.org,
yonghong.song@linux.dev, Alan Maguire <alan.maguire@oracle.com>,
Daniel Xu <dxu@dxuuu.xyz>,
Kumar Kartikeya Dwivedi <memxor@gmail.com>,
Vadim Fedorenko <vadfed@meta.com>
Subject: Re: [PATCH dwarves v1] btf_encoder: handle .BTF_ids section endianness when cross-compiling
Date: Tue, 26 Nov 2024 11:31:15 -0800 [thread overview]
Message-ID: <69af35e3718748b99e4d295bead4072588a50296.camel@gmail.com> (raw)
In-Reply-To: <CAEf4BzakAiPWF9x2h-F737LbJ9ovXCJLbXV9R5vKg0Et5CbqSQ@mail.gmail.com>
On Tue, 2024-11-26 at 11:26 -0800, Andrii Nakryiko wrote:
> On Thu, Nov 21, 2024 at 11:02 PM Eduard Zingerman <eddyz87@gmail.com> wrote:
> >
> > btf_encoder__tag_kfuncs() reads .BTF_ids section to identify a set of
> > kfuncs present in the ELF being processed. This section consists of
> > records of the following shape:
> >
> > struct btf_id_and_flag {
> > uint32_t id;
> > uint32_t flags;
> > };
> >
>
> Can we just set data->d_type to ELF_T_WORD and let libelf handle the byte swap?
When I tried 'data->d_type = ELF_T_WORD' + gelf_xlatetom() snippet
suggested by Tony Ambardar some time ago, I got a write protection error.
Concluded that this is so, because file is opened in O_RDONLY mode.
(Also please note v2 of this patch).
[...]
next prev parent reply other threads:[~2024-11-26 19:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-22 7:02 [PATCH dwarves v1] btf_encoder: handle .BTF_ids section endianness when cross-compiling Eduard Zingerman
2024-11-22 15:03 ` Vadim Fedorenko
2024-11-22 15:11 ` Jiri Olsa
2024-11-22 18:08 ` Eduard Zingerman
2024-11-22 18:16 ` Eduard Zingerman
2024-11-26 19:26 ` Andrii Nakryiko
2024-11-26 19:31 ` Eduard Zingerman [this message]
2024-11-26 21:51 ` Andrii Nakryiko
2024-11-27 0:30 ` Eduard Zingerman
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=69af35e3718748b99e4d295bead4072588a50296.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=alan.maguire@oracle.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=arnaldo.melo@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=dwarves@vger.kernel.org \
--cc=dxu@dxuuu.xyz \
--cc=kernel-team@fb.com \
--cc=memxor@gmail.com \
--cc=vadfed@meta.com \
--cc=yonghong.song@linux.dev \
/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