Commit 387de56
committed
libbpf: Fix inheritance of BTF pointer size
Update btf_new_empty() to copy the pointer size from a provided base BTF.
This ensures split BTF works properly and fixes test failures seen on
32-bit targets:
root@qemu-armhf:/usr/libexec/kselftests-bpf# ./test_progs -a btf_split
__test_btf_split:PASS:empty_main_btf 0 nsec
__test_btf_split:PASS:main_ptr_sz 0 nsec
__test_btf_split:PASS:empty_split_btf 0 nsec
__test_btf_split:FAIL:inherit_ptr_sz unexpected inherit_ptr_sz: actual 4 != expected 8
[...]
torvalds#41/1 btf_split/single_split:FAIL
Fixes: ba45136 ("libbpf: Implement basic split BTF support")
Signed-off-by: Tony Ambardar <[email protected]>1 parent 18a6331 commit 387de56
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1009 | 1009 | | |
1010 | 1010 | | |
1011 | 1011 | | |
| 1012 | + | |
1012 | 1013 | | |
1013 | 1014 | | |
1014 | 1015 | | |
| |||
0 commit comments