From feec716d2eadc88457932ef2821e096816fa8846 Mon Sep 17 00:00:00 2001 From: Lorenz Bauer Date: Tue, 3 Oct 2023 10:21:22 +0100 Subject: [PATCH] elf: test BTF map typedef support Signed-off-by: Lorenz Bauer --- elf_reader_test.go | 6 ++++++ testdata/loader-clang-11-eb.elf | Bin 10504 -> 10720 bytes testdata/loader-clang-11-el.elf | Bin 10504 -> 10720 bytes testdata/loader-clang-14-eb.elf | Bin 10448 -> 10664 bytes testdata/loader-clang-14-el.elf | Bin 10448 -> 10664 bytes testdata/loader-clang-17-eb.elf | Bin 10448 -> 10664 bytes testdata/loader-clang-17-el.elf | Bin 10448 -> 10664 bytes testdata/loader.c | 10 ++++++++++ 8 files changed, 16 insertions(+) diff --git a/elf_reader_test.go b/elf_reader_test.go index c7271b823..be2fead55 100644 --- a/elf_reader_test.go +++ b/elf_reader_test.go @@ -90,6 +90,12 @@ func TestLoadCollectionSpec(t *testing.T) { MaxEntries: 1, }, }, + "btf_typedef_map": { + Type: Array, + KeySize: 4, + ValueSize: 4, + MaxEntries: 1, + }, }, Programs: map[string]*ProgramSpec{ "xdp_prog": { diff --git a/testdata/loader-clang-11-eb.elf b/testdata/loader-clang-11-eb.elf index d9ef2e3a0b114abcd484a5ef0c1c35a8ba5c51e9..d10b46feb9c759e8c219df654283bf380cad244f 100644 GIT binary patch delta 3248 zcmZ`*U2IfE6h1S1Z?`{-QYh{27VO&X&!X5?MT+vX1?5jFY$PZk+AYw!i4Yso7#h(_ zFp-jMV$Ep6i*W%TNrVGQ@`=#Xa*>Z2Hy>Mu9x325UOf8K@%B!$5o&GBc6DGXSG zxgx>_qPzL=ANCWl^V)m<$Nsyqx6ar-vNn+2#^GM$z!U89s^RaS&4*4I{()Qgj}6~G zn|Epq|6q~dtT%8j7{dy*ZnG{Qm0;HG3$eE^t1zLBJlu@w*lJ+7y1P`NY=hTp*bbj1 zDu)7jm>*^Qz#D@1A>+3em{-4Ku=WE!IvW?`Y~%nY4!@JI@!P;Wk>?(p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g%2g(0ScIyqBofstlDreIw9_Md_lOfM6q<)kKGcyyS_>fj}d_DW?M6;U(NS&dLzu8qJ#QP5Eme z82$z=&Pvo5gH+>vUq*vR_>*!p7!3ceV~QyNW@3b#3nuZy`$I6upOb$EC&F)ItkTTq z#Qm61#>?_jC>UNsi@YI{VEyXJ*ll?;l;r0n4+q18=%ECE#>`lk0swArtj;g7T1H9EynlOVJlj|>%b~d?pmx)jebpGsvY6s) z)^NMU0r>Z8rUl2S*AwZFH!XSOc$G{yMu&MWtH2p}aEr=(AK~YY?1ud8f!DX$PJIq}D(0$=DK$=A_eq|J z=jWDhITZ`YTZshEle{h-U4hrr`_D;K hBW|GkOzGVW$%Ed?oESQ%ceTuyqI(9blH+xi{{pl7FkJuu diff --git a/testdata/loader-clang-17-eb.elf b/testdata/loader-clang-17-eb.elf index 1fbe7a50de48cc16404d19955c9e607f3550d1cf..1cec1b94c8ce95e8702814db02e7f3c6ea426e89 100644 GIT binary patch delta 3090 zcmaJ@TWpj?6h8Cs{@oT@fzr!vVeQ(b7ZB-!*rFl@MGClLjYu#-Tdww@%BnS?31La_ zQW6Z1;lT%ysxfIICM#MdxU>Y(oTcB@0h%ie2B7a}R$8!gwP zkxGoIiZPKGnt!D@9Q`Sh{Iy(+%x51pf0BZ_25pwU>8JAw+8ElOccFu{p^=lSVDvCV z0Lw7ODrpe8m)(EZkHOBl_uavM!`j<#+wY!u6?xqBEK8&KpE?HKC<^OU1Rv9XPuq}}1pzB5 z&|iW^B1Tr*ktJS-#*ys_Gz#?%Mho<(pwF~?55}56_rGyMSPzbZx&C>>HwHvkFc`x{ zXTmCdb^0HPSGNxJzO*&hJ1E-*cl8bq<#z7axr@w4=PLcYnuW=zl97c_Pe4NzjVwYR zM_U5^FN~pI1}@heyi_D|(!m|T-#d62g1*PW4*_2=IFBB(91ZE4VE7s#3LC48D05Bl z%nd#uDvO6{d}${}uqJ4GJ&oVTqBe7paNduiwz%_%nPeRMbAtDxs6CvJviO9ky}VM$ z)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}Kk5gV#Ht!S4Ysuyj3vh_uJ4)C`OYY;W3Kj8bux~$S^a2`=fa#PBhroRnH-h^u zt_L5tSb%94?FIhmKwzEOnKofy|E}yzi3OOp+g{-f(nmN;=mA!V&txZ5i&4Z`&W5!A z8F1M-&dyrw13S}}5P>jjaR@wbaRYeS;yUmxiv`%e2eeZcXd=^G-3QE38R-k8&vPep zmUl?F#??i!S6WE7`rGUdwSjZL&mN88PJ~g%2g(0ScIyqBofstlDreIw9_Md_lOfM6q<)kKGcyyS_>fj}d_DW?M6;U(NS&dLzu8qJ#QP5Eme z82$z=&Pvo5gH+>vUq*vR_>*!p7!3ceV~QyNW@3b#3nuZy`$I6upOb$EC&F)ItkTTq z#Qm61#>?_jC>UNsi@YI{VEyXJ*ll?;l;r0n4+q18=%ECE#>`lk0swArtj;g7T1H9EynlOVJlj|>%b~d?pmx)jebpGsvY6s) z)^NMU0r>Z8rUl2S*AwZFH!XSOc$G{yMu&MWtH2p}aEr=(AK~YY?1ud8f!DX$PJIq}D(0$=DK$=A_eq|J z=jWDhITZ`YTZshEle{h-U4hrr`_D;K hBW|GkOzGVW$%Ed?oESQ%ceTuyqI(9blH+xi{{pl7FkJuu diff --git a/testdata/loader.c b/testdata/loader.c index 8875be82e..79556a333 100644 --- a/testdata/loader.c +++ b/testdata/loader.c @@ -69,6 +69,16 @@ struct bpf_map_def array_of_hash_map __section("maps") = { .max_entries = 2, }; +typedef struct { + __uint(type, BPF_MAP_TYPE_ARRAY); + __uint(key_size, sizeof(uint32_t)); + __uint(value_size, sizeof(uint64_t)); + __uint(max_entries, 1); +} array_map_t; + +// Map definition behind a typedef. +array_map_t btf_typedef_map __section(".maps"); + static int __attribute__((noinline)) __section("static") static_fn(uint32_t arg) { return arg - 1; }