2020-08-20 18:46:50 +00:00
|
|
|
From fafb2e7eaec6d33ce16e28f481edf781219d5d27 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Tony Ambardar <Tony.Ambardar@gmail.com>
|
|
|
|
Date: Fri, 24 Jul 2020 23:58:17 -0700
|
|
|
|
Subject: [PATCH] tools/libbpf: ensure no local symbols counted in ABI check
|
|
|
|
|
|
|
|
This avoids finding versioned local symbols such as _init and _fini in
|
|
|
|
the libbpf.so file.
|
|
|
|
|
|
|
|
Signed-off-by: Tony Ambardar <Tony.Ambardar@gmail.com>
|
|
|
|
---
|
|
|
|
tools/lib/bpf/Makefile | 2 ++
|
|
|
|
1 file changed, 2 insertions(+)
|
|
|
|
|
|
|
|
--- a/tools/lib/bpf/Makefile
|
|
|
|
+++ b/tools/lib/bpf/Makefile
|
2020-08-30 22:54:51 +00:00
|
|
|
@@ -152,6 +152,7 @@ GLOBAL_SYM_COUNT = $(shell readelf -s --
|
2020-08-20 18:46:50 +00:00
|
|
|
awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {print $$NF}' | \
|
|
|
|
sort -u | wc -l)
|
|
|
|
VERSIONED_SYM_COUNT = $(shell readelf --dyn-syms --wide $(OUTPUT)libbpf.so | \
|
|
|
|
+ awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {print $$NF}' | \
|
|
|
|
grep -Eo '[^ ]+@LIBBPF_' | cut -d@ -f1 | sort -u | wc -l)
|
|
|
|
|
|
|
|
CMD_TARGETS = $(LIB_TARGET) $(PC_FILE)
|
|
|
|
@@ -219,6 +220,7 @@ check_abi: $(OUTPUT)libbpf.so
|
|
|
|
awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {print $$NF}'| \
|
|
|
|
sort -u > $(OUTPUT)libbpf_global_syms.tmp; \
|
|
|
|
readelf --dyn-syms --wide $(OUTPUT)libbpf.so | \
|
|
|
|
+ awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {print $$NF}'| \
|
|
|
|
grep -Eo '[^ ]+@LIBBPF_' | cut -d@ -f1 | \
|
|
|
|
sort -u > $(OUTPUT)libbpf_versioned_syms.tmp; \
|
|
|
|
diff -u $(OUTPUT)libbpf_global_syms.tmp \
|