On 01/26/2018 09:30 AM, Mickaël Salaün wrote: > On 26/01/2018 03:16, Alexei Starovoitov wrote: >> On Fri, Jan 26, 2018 at 01:39:30AM +0100, Mickaël Salaün wrote: >>> Do not build lib/bpf/bpf.o with this Makefile but use the one from the >>> library directory. This avoid making a buggy bpf.o file (e.g. missing >>> symbols). >> >> could you provide an example? >> What symbols will be missing? >> I don't think there is an issue with existing Makefile. > > You can run this commands: > make -C samples/bpf; nm tools/lib/bpf/bpf.o > a; make -C tools/lib/bpf; > nm tools/lib/bpf/bpf.o > b; diff -u a b > > Symbols like bzero and sys_bpf are missing with the samples/bpf > Makefile, which makes the bpf.o shrink from 25K to 7K.
I've applied it to bpf-next, thanks Mickaël!