2021-02-05 08:48:47 +00:00
|
|
|
#!/bin/sh -e
|
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
# Copyright (c) 2019 Red Hat, Inc.
|
|
|
|
|
|
|
|
if [ $# != 1 ]; then
|
2022-09-06 04:00:10 +00:00
|
|
|
echo "Usage: $0 installdir" >&2
|
2021-02-05 08:48:47 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
installdir=$1
|
|
|
|
if [ ! -d $installdir ]; then
|
2022-09-06 04:00:10 +00:00
|
|
|
echo "Error: install directory '$installdir' does not exist." >&2
|
2021-02-05 08:48:47 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
dumpdir=$installdir/dump
|
|
|
|
rm -rf $dumpdir
|
|
|
|
mkdir -p $dumpdir
|
|
|
|
for f in $(find $installdir -name "*.so.*"); do
|
|
|
|
if test -L $f; then
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
|
|
|
libname=$(basename $f)
|
|
|
|
abidw --out-file $dumpdir/${libname%.so*}.dump $f
|
|
|
|
done
|