summaryrefslogtreecommitdiff
path: root/linux/missingsymbols
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /linux/missingsymbols
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'linux/missingsymbols')
-rw-r--r--linux/missingsymbols21
1 files changed, 21 insertions, 0 deletions
diff --git a/linux/missingsymbols b/linux/missingsymbols
new file mode 100644
index 0000000..ed96d2b
--- /dev/null
+++ b/linux/missingsymbols
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+inputModule=$1
+dependencies=$2
+objectFilesDir=$3
+
+if [ "$inputModule" == "" -o "$dependencies" == "" -o "$objectFilesDir" == "" ]; then
+ echo "First arg is the module to search. Second arg is dependencies. Third is object files dir."
+ echo "ex: missingsymbols server_tf_i486.so \"tier0_i486.so vstdlib_i486.so\" ~/linux/src/engine/obj"
+ exit
+fi
+
+missingSymbols=`nm -o $inputModule | grep -i " U " | grep -o '[^[:space:]]*$' | grep -v '@@'`
+
+for missingSymbol in $missingSymbols; do
+ modulesContaining=`nm -o $dependencies | grep $missingSymbol`
+ if [ "$modulesContaining" == "" ]; then
+ echo `c++filt "$missingSymbol"` "($missingSymbol)"
+ fi
+done
+