Skip to content

Commit 89dedae

Browse files
Björn Töpelborkmann
authored andcommitted
libbpf: add libelf dependency to shared library build
The DPDK project is moving forward with its AF_XDP PMD, and during that process some libbpf issues surfaced [1]: When libbpf was built as a shared library, libelf was not included in the linking phase. Since libelf is an internal depedency to libbpf, libelf should be included. This patch adds '-lelf' to resolve that. [1] https://patches.dpdk.org/patch/50704/#93571 Fixes: 1b76c13 ("bpf tools: Introduce 'bpf' library and add bpf feature check") Suggested-by: Luca Boccassi <bluca@debian.org> Signed-off-by: Björn Töpel <bjorn.topel@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
1 parent 379e201 commit 89dedae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/lib/bpf/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ $(OUTPUT)libbpf.so: $(OUTPUT)libbpf.so.$(LIBBPF_VERSION)
177177

178178
$(OUTPUT)libbpf.so.$(LIBBPF_VERSION): $(BPF_IN)
179179
$(QUIET_LINK)$(CC) --shared -Wl,-soname,libbpf.so.$(VERSION) \
180-
-Wl,--version-script=$(VERSION_SCRIPT) $^ -o $@
180+
-Wl,--version-script=$(VERSION_SCRIPT) $^ -lelf -o $@
181181
@ln -sf $(@F) $(OUTPUT)libbpf.so
182182
@ln -sf $(@F) $(OUTPUT)libbpf.so.$(VERSION)
183183

0 commit comments

Comments
 (0)