Thread (16 messages) 16 messages, 4 authors, 2021-05-19

[dpdk-dev] [PATCH v2 1/2] devtools: catch symbol duplicates in version map

From: David Marchand <hidden>
Date: 2021-05-05 14:30:14
Subsystem: the rest · Maintainer: Linus Torvalds

Add a check on versioned symbol duplicates in map files.

Signed-off-by: David Marchand <redacted>
---
Changes since v1:
- rebased,

---
 devtools/check-symbol-maps.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh
index f06353fc75..f2c7d29663 100755
--- a/devtools/check-symbol-maps.sh
+++ b/devtools/check-symbol-maps.sh
@@ -35,4 +35,19 @@ if [ -n "$orphan_symbols" ] ; then
     ret=1
 fi
 
+find_duplicate_symbols ()
+{
+    for map in $(find lib drivers -name '*.map') ; do
+        buildtools/map-list-symbol.sh $map | \
+            sort | uniq -c | grep -v " 1 $map" || true
+    done
+}
+
+duplicate_symbols=$(find_duplicate_symbols)
+if [ -n "$duplicate_symbols" ] ; then
+    echo "Found duplicates in symbol map file:"
+    echo "$duplicate_symbols"
+    ret=1
+fi
+
 exit $ret
-- 
2.23.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help