Skip to content

Read BTF alone in rk btf and write qualifiers in one order - #81

Merged
tamnd merged 1 commit into
mainfrom
rk-btf-raw
Oct 7, 2026
Merged

tamnd merged 1 commit into
mainfrom
rk-btf-raw

Conversation

@tamnd

@tamnd tamnd commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Two things the first run of rk btf on real pahole output showed, on a test file built with gcc-14 and rucc for arm64 and encoded with pahole --btf_encode_detached.

rk btf now reads a file that is BTF alone, which is what pahole --btf_encode_detached writes and what /sys/kernel/btf/vmlinux is, besides an ELF file with a .BTF section. pahole needs llvm-objcopy to add the section itself, so detached BTF is the easy way to compare single objects.

A run of const, volatile and restrict is now written in one order. gcc describes const volatile int as volatile over const and rucc as const over volatile, which means the same type and should not be a finding.

The rest of what the run found is rucc's DWARF and goes to tamnd/rucc: base type names (unsigned long where gcc says long unsigned int), a typedef lost in a function pointer's return type, multi-dimensional arrays nested instead of one array type with several subranges, and typedefs nothing uses.

Part of #6 and #7.

@tamnd tamnd added kind/feature New capability in the harness area/rk The rk command line row/a64 arm64 labels Oct 7, 2026
@tamnd
tamnd merged commit 4854b73 into main Oct 7, 2026
0 of 2 checks passed
@tamnd
tamnd deleted the rk-btf-raw branch October 7, 2026 16:05
@tamnd tamnd mentioned this pull request Oct 9, 2026
4 of 7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/rk The rk command line kind/feature New capability in the harness row/a64 arm64

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant