libbpf: Support loading individual progs
Allow the individual program load to be invoked. This will help with testing, where a single ELF may contain several sections, some of which denote subprograms that are expected to fail verification, along with some which are expected to pass verification. By allowing programs to be iterated and individually loaded, each program can be independently checked against its expected verification result. Signed-off-by: Joe Stringer <joe@wand.net.nz> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:

committed by
Daniel Borkmann

parent
b584ab8840
commit
29cd77f416
@@ -228,7 +228,7 @@ struct bpf_object {
|
||||
};
|
||||
#define obj_elf_valid(o) ((o)->efile.elf)
|
||||
|
||||
static void bpf_program__unload(struct bpf_program *prog)
|
||||
void bpf_program__unload(struct bpf_program *prog)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -1375,7 +1375,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
int
|
||||
bpf_program__load(struct bpf_program *prog,
|
||||
char *license, u32 kern_version)
|
||||
{
|
||||
|
Reference in New Issue
Block a user