Commit 6ebaa3f
libbpf: Rewrite btf datasec names starting from '?'
Optional struct_ops maps are defined using question mark at the start
of the section name, e.g.:
SEC("?.struct_ops")
struct test_ops optional_map = { ... };
This commit teaches libbpf to detect if kernel allows '?' prefix
in datasec names, and if it doesn't then to rewrite such names
by replacing '?' with '_', e.g.:
DATASEC ?.struct_ops -> DATASEC _.struct_ops
Signed-off-by: Eduard Zingerman <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]1 parent 5ad0ecb commit 6ebaa3f
3 files changed
+41
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
150 | 169 | | |
151 | 170 | | |
152 | 171 | | |
| |||
534 | 553 | | |
535 | 554 | | |
536 | 555 | | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
537 | 559 | | |
538 | 560 | | |
539 | 561 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2869 | 2869 | | |
2870 | 2870 | | |
2871 | 2871 | | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
2872 | 2877 | | |
2873 | 2878 | | |
2874 | 2879 | | |
| |||
2878 | 2883 | | |
2879 | 2884 | | |
2880 | 2885 | | |
| 2886 | + | |
2881 | 2887 | | |
2882 | 2888 | | |
2883 | | - | |
| 2889 | + | |
2884 | 2890 | | |
2885 | 2891 | | |
2886 | 2892 | | |
| |||
2892 | 2898 | | |
2893 | 2899 | | |
2894 | 2900 | | |
| 2901 | + | |
2895 | 2902 | | |
2896 | 2903 | | |
2897 | 2904 | | |
| |||
2918 | 2925 | | |
2919 | 2926 | | |
2920 | 2927 | | |
2921 | | - | |
| 2928 | + | |
2922 | 2929 | | |
2923 | 2930 | | |
2924 | 2931 | | |
| |||
2933 | 2940 | | |
2934 | 2941 | | |
2935 | 2942 | | |
| 2943 | + | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
| 2948 | + | |
| 2949 | + | |
| 2950 | + | |
2936 | 2951 | | |
2937 | 2952 | | |
2938 | 2953 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| 377 | + | |
| 378 | + | |
377 | 379 | | |
378 | 380 | | |
379 | 381 | | |
| |||
0 commit comments