Need Help: gcc suppport for bpf target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux