[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190327135114.17026-3-bjorn.topel@gmail.com>
Date: Wed, 27 Mar 2019 14:51:14 +0100
From: Björn Töpel <bjorn.topel@...il.com>
To: ast@...nel.org, daniel@...earbox.net, netdev@...r.kernel.org
Cc: Björn Töpel <bjorn.topel@...el.com>,
magnus.karlsson@...el.com, bpf@...r.kernel.org,
xiaolong.ye@...el.com, qi.z.zhang@...el.com
Subject: [PATCH bpf 2/2] libbpf: add libelf dependency to shared library build
From: Björn Töpel <bjorn.topel@...el.com>
When libbpf was built was a shared library, libelf was not included in
the linking phase. Since libelf is an internal depedency to libbpf,
libeld should be included. This patch adds '-lelf' to resolve that.
Fixes: 1b76c13e4b36 ("bpf tools: Introduce 'bpf' library and add bpf feature check")
Suggested-by: Luca Boccassi <bluca@...ian.org>
Signed-off-by: Björn Töpel <bjorn.topel@...el.com>
---
tools/lib/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
index 279589c29983..7beec4d5b522 100644
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -177,7 +177,7 @@ $(OUTPUT)libbpf.so: $(OUTPUT)libbpf.so.$(LIBBPF_VERSION)
$(OUTPUT)libbpf.so.$(LIBBPF_VERSION): $(BPF_IN)
$(QUIET_LINK)$(CC) --shared -Wl,-soname,libbpf.so.$(VERSION) \
- -Wl,--version-script=$(VERSION_SCRIPT) $^ -o $@
+ -Wl,--version-script=$(VERSION_SCRIPT) $^ -lelf -o $@
@ln -sf $(@F) $(OUTPUT)libbpf.so
@ln -sf $(@F) $(OUTPUT)libbpf.so.$(VERSION)
--
2.19.1
Powered by blists - more mailing lists