On Sat, Nov 20, 2021 at 7:27 AM Matteo Croce [off-list ref] wrote:
On Sat, Nov 20, 2021 at 4:33 AM Alexei Starovoitov
[off-list ref] wrote:
quoted
From: Alexei Starovoitov <ast@kernel.org>
Make relo_core.c to be compiled for the kernel and for user space libbpf.
Note the patch is reducing BPF_CORE_SPEC_MAX_LEN from 64 to 32.
This is the maximum number of nested structs and arrays.
For example:
struct sample {
int a;
struct {
int b[10];
};
};
struct sample *s = ...;
int y = &s->b[5];
I don't understand this. Is this intentional, or it should be one of:
int y = s->b[5];
int *y = &s->b[5];
Eagle eye. I copy pasted this typo from libbpf.
Will fix in all places at once either in a respin or in a separate patch.
For the purpose of the example it could be either.
int *y = &s->b[5]; is a relocatable ADD.
int y = s->b[5]; is a relocatable LDX.