Re: [RFC PATCH v3 06/37] bpf tools: Introduce 'bpf' library to tools

From: Wangnan (F)
Date: Tue May 19 2015 - 23:48:54 EST




å 2015/5/19 1:35, Alexei Starovoitov åé:
On 5/17/15 3:56 AM, Wang Nan wrote:
This is the first patch of libbpf. The goal of libbpf is to create a
standard way for accessing eBPF object files. This patch creates
Makefile and Build for it, allows 'make' to build libbpf.a and
libbpf.so, 'make install' to put them into proper directories.
Most part of Makefile is borrowed from traceevent. Before building,
it checks the existance of libelf in Makefile, and deny to build if
not found. Instead of throw an error if libelf not found, the error
raises in a phony target "elfdep". This design is to ensure
'make clean' still workable even if libelf is not found.

Signed-off-by: Wang Nan <wangnan0@xxxxxxxxxx>
---
...
+
+# Version of eBPF elf file
+FILE_VERSION = 1

what that comment suppose to mean?

The format of eBPF objects can be improved in futher. A version number
here is the precaution of backward compatibility. However this patch doesn't
utilize it.

I'd like to append a 'format' section into eBPF object format to let libbpf know
the version of the object. What do you think?

Thank you.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/