All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] devtools: catch empty symbol maps
@ 2022-11-14 14:16 David Marchand
  2022-11-14 14:31 ` Bruce Richardson
  0 siblings, 1 reply; 4+ messages in thread
From: David Marchand @ 2022-11-14 14:16 UTC (permalink / raw)
  To: dev; +Cc: omer.yamac, Thomas Monjalon

version.map are now optional for drivers if no symbol is exported.
Having no symbol exported from a library does not make sense.

Catch all empty maps and warn about them.

Example:
$ ./devtools/check-symbol-maps.sh
Found empty maps:
drivers/crypto/uadk/version.map
drivers/net/gve/version.map
drivers/net/idpf/version.map

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 devtools/check-symbol-maps.sh | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh
index 32e1fa5c8f..0a6062de26 100755
--- a/devtools/check-symbol-maps.sh
+++ b/devtools/check-symbol-maps.sh
@@ -60,4 +60,18 @@ if [ -n "$local_miss_maps" ] ; then
     ret=1
 fi
 
+find_empty_maps ()
+{
+    for map in $@ ; do
+        [ $(buildtools/map-list-symbol.sh $map | wc -l) != '0' ] || echo $map
+    done
+}
+
+empty_maps=$(find_empty_maps $@)
+if [ -n "$empty_maps" ] ; then
+    echo "Found empty maps:"
+    echo "$empty_maps"
+    ret=1
+fi
+
 exit $ret
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-15 17:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-14 14:16 [PATCH] devtools: catch empty symbol maps David Marchand
2022-11-14 14:31 ` Bruce Richardson
2022-11-14 15:10   ` Ferruh Yigit
2022-11-15 17:20     ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.