| Date | Wed, 27 May 2015 18:45:10 -0700 | From | Alexei Starovoitov <> | Subject | Re: [RFC PATCH v4 07/29] bpf tools: Check endianess and make libbpf fail early |
| |
On Wed, May 27, 2015 at 05:19:42AM +0000, Wang Nan wrote: > Check endianess according to EHDR. Code is taken from > tools/perf/util/symbol-elf.c. > > Libbpf doesn't magically convert missmatched endianess. See discussion > on https://lkml.org/lkml/2015/5/18/650 that, even if we swap > eBPF instructions to correct byte order, we are unable to deal with > endianess in code logical generated by LLVM. > > Therefore, libbpf should simply reject missmatched ELF object, and let > LLVM to create good code. > > Signed-off-by: Wang Nan <wangnan0@huawei.com>
lgtm Acked-by: Alexei Starovoitov <ast@plumgrid.com>
|