From: Hilko Bengen Date: Sun, 2 Dec 2018 23:26:03 +0000 (+0000) Subject: libbpf: link shared object with libelf X-Git-Tag: archive/raspbian/5.2.17-1+rpi1^2^2^2^2~24 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c66a4eb20f9c669c0c55c3b83465cb0c96e9a79c;p=linux.git libbpf: link shared object with libelf libbpf.so needs to be linked against libelf to avoid missing symbols. Signed-off-by: Hilko Bengen Gbp-Pq: Topic bugfix/all Gbp-Pq: Name libbpf-link-shared-object-with-libelf.patch --- diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile index d40b6432e93..86fd56c698b 100644 --- a/tools/lib/bpf/Makefile +++ b/tools/lib/bpf/Makefile @@ -170,7 +170,7 @@ $(BPF_IN): force elfdep bpfdep $(Q)$(MAKE) $(build)=libbpf $(OUTPUT)libbpf.so.$(LIBBPF_VERSION): $(BPF_IN) - $(QUIET_LINK)$(CC) --shared $^ -Wl,-soname,$(@F) -o $@ + $(QUIET_LINK)$(CC) --shared $^ -lelf -Wl,-soname,$(@F) -o $@ $(OUTPUT)libbpf.a: $(BPF_IN) $(QUIET_LINK)$(RM) $@; $(AR) rcs $@ $^