Re: [PATCH iproute2] bpf: check map symbol type properly with newer llvm compiler

2018-10-31 Thread Stephen Hemminger
On Mon, 29 Oct 2018 15:32:03 -0700 Yonghong Song wrote: > With llvm 7.0 or earlier, the map symbol type is STT_NOTYPE. > -bash-4.4$ cat t.c > __attribute__((section("maps"))) int g; > -bash-4.4$ clang -target bpf -O2 -c t.c > -bash-4.4$ readelf -s t.o > > Symbol table '.symtab'

Re: [PATCH iproute2] bpf: check map symbol type properly with newer llvm compiler

2018-10-29 Thread Daniel Borkmann
On 10/29/2018 11:32 PM, Yonghong Song wrote: > With llvm 7.0 or earlier, the map symbol type is STT_NOTYPE. > -bash-4.4$ cat t.c > __attribute__((section("maps"))) int g; > -bash-4.4$ clang -target bpf -O2 -c t.c > -bash-4.4$ readelf -s t.o > > Symbol table '.symtab' contains 2 entries:

[PATCH iproute2] bpf: check map symbol type properly with newer llvm compiler

2018-10-29 Thread Yonghong Song
With llvm 7.0 or earlier, the map symbol type is STT_NOTYPE. -bash-4.4$ cat t.c __attribute__((section("maps"))) int g; -bash-4.4$ clang -target bpf -O2 -c t.c -bash-4.4$ readelf -s t.o Symbol table '.symtab' contains 2 entries: Num:Value Size TypeBind Vis