public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Need Help: gcc suppport for bpf target
@ 2022-12-20 16:06 SuHsueyu
  0 siblings, 0 replies; only message in thread
From: SuHsueyu @ 2022-12-20 16:06 UTC (permalink / raw)
  To: gcc-help

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-20 16:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-20 16:06 Need Help: gcc suppport for bpf target SuHsueyu

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).