summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Derksen <mderkse1@us.ibm.com>2018-02-07 16:25:33 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-02-14 12:08:56 -0500
commitb6f70467b7203502ac1cb92eb921620086c17775 (patch)
tree8e1c2b29317250a89da1ee8a9657d7a55f721b66
parent9efdc04854a980d914ad92e141b01f260ff2e71e (diff)
downloadtalos-hostboot-b6f70467b7203502ac1cb92eb921620086c17775.tar.gz
talos-hostboot-b6f70467b7203502ac1cb92eb921620086c17775.zip
Add duplibs.sh tool to our hostboot repo
This tool helps detect if object files are being included in multiple libraries Change-Id: Ie01a079560ee785802e9245e8804db6587893191 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/53592 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rwxr-xr-xsrc/build/tools/duplibs.sh45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/build/tools/duplibs.sh b/src/build/tools/duplibs.sh
new file mode 100755
index 000000000..d74732619
--- /dev/null
+++ b/src/build/tools/duplibs.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/tools/duplibs.sh $
+#
+# OpenPOWER HostBoot Project
+#
+# Contributors Listed Below - COPYRIGHT 2018
+# [+] International Business Machines Corp.
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# IBM_PROLOG_END_TAG
+
+#####################################################
+# Checks for duplicate objects in multiple libraries
+#####################################################
+
+for i in `ls -R $@ | grep '\.o$' | sort -u`
+#for i in `ls -R obj/modules/ | grep '\.o$' | sort -u`
+ do
+ f=(`find $@ -name $i`)
+ if [ ${#f[@]} -gt 2 ]
+ then
+ echo "=== file $i appears ${#f[@]} times in:"
+ for j in ${f[@]}
+ do
+ dir=`dirname $j`
+ #size=`ls -al $j | cut -f 5 -d' '`
+ echo " $dir"
+ done
+ fi
+done
OpenPOWER on IntegriCloud