https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123516

--- Comment #4 from Sam James <sjames at gcc dot gnu.org> ---
`diff -u <(bpftool btf dump file xdp_trafficgen.bpf.o) <(bpftool btf dump file
xdp_trafficgen.bpf.o.clang)` is a bit more useful, I think

For GCC, I see:
-[133] VAR 'config' type_id=116, linkage=global
[...]
-[184] DATASEC '.rodata' size=0 vlen=4
-       type_id=133 offset=0 size=8 (VAR 'config')

For Clang, I see:
+[103] VAR 'config' type_id=100, linkage=global
[...]
+       type_id=103 offset=0 size=8 (VAR 'config')

but that sounds ok.

Comparing `git diff --no-index <(bpftool btf dump file xdp_trafficgen.bpf.o
format c) <(bpftool btf dump file xdp_trafficgen.bpf.o.clang format c)
--color=always | less`, I see a few other differences but I think that's just
Clang pruning unused types more aggressively.

Reply via email to