From: SuHsueyu <anolasc13@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: Need Help: gcc suppport for bpf target
Date: Wed, 21 Dec 2022 00:06:50 +0800 [thread overview]
Message-ID: <CAEc2n-vO5Lm2yS-tR8cOBsobX-2D5MAoMSofbLs0SxdyOQhmDQ@mail.gmail.com> (raw)
Hello, I'm new to gcc bpf. Currently, I use gcc 12.1.0, and I compiled
a ebpf map definition source file t.c:
struct t {
int a:2;
int b:3;
int c:2;
} g;
with gcc -c -gbtf t.c
and use readelf to read the obj file. But the machine section is
x86-64, my machine architure, and I expected "Machine: Linux BPF"
which can be compiled with clang -target bpf t.c.
I'm curious if GCC allows for the generation of target BPF. Or if
there's a useful compile option I'm missing.
reply other threads:[~2022-12-20 16:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=CAEc2n-vO5Lm2yS-tR8cOBsobX-2D5MAoMSofbLs0SxdyOQhmDQ@mail.gmail.com \
--to=anolasc13@gmail.com \
--cc=gcc-help@gcc.gnu.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 read-only IMAP folder(s) and NNTP newsgroup(s).