mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
2003-03-27 Roland McGrath <roland@redhat.com>
* scripts/rpm2dynsym.sh: New file. * Makefile (distribute): Add it.
This commit is contained in:
4
Makefile
4
Makefile
@ -283,7 +283,9 @@ distribute := README README.libm INSTALL FAQ FAQ.in NOTES NEWS BUGS \
|
|||||||
gen-sorted.awk abi-versions.awk abilist.awk \
|
gen-sorted.awk abi-versions.awk abilist.awk \
|
||||||
firstversions.awk documented.sh cpp \
|
firstversions.awk documented.sh cpp \
|
||||||
output-format.sed gen-as-const.awk \
|
output-format.sed gen-as-const.awk \
|
||||||
merge-abilist.awk extract-abilist.awk) \
|
merge-abilist.awk extract-abilist.awk \
|
||||||
|
rpm2dynsym.sh \
|
||||||
|
)
|
||||||
$(wildcard abilist/*.abilist)
|
$(wildcard abilist/*.abilist)
|
||||||
|
|
||||||
distribute := $(strip $(distribute))
|
distribute := $(strip $(distribute))
|
||||||
|
36
scripts/rpm2dynsym.sh
Executable file
36
scripts/rpm2dynsym.sh
Executable file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This script takes rpm package files, finds *.so.N files in them,
|
||||||
|
# and runs objdump --dynamic-syms on them. The arguments are rpm file
|
||||||
|
# names. For each rpm, it creates an output file with the name
|
||||||
|
# "NAME-VERSION-RELEASE.ARCH.dynsym", the variable parts being extracted
|
||||||
|
# from the rpm's headers (not its file name). Each file contains the
|
||||||
|
# collected objdump output for all the *.so.N files in the corresponding rpm.
|
||||||
|
# This can be processed with abilist.awk or sent to someone who will do that.
|
||||||
|
# This does not do a lot of error-checking, so you should always watch stderr
|
||||||
|
# and sanity-check the resulting output files.
|
||||||
|
|
||||||
|
RPM=${RPM:-rpm}
|
||||||
|
RPM2CPIO=${RPM2CPIO:-rpm2cpio}
|
||||||
|
CPIO=${CPIO:-cpio}
|
||||||
|
OBJDUMP=${OBJDUMP:-objdump}
|
||||||
|
|
||||||
|
unpackdir=/tmp/rpm2dynsym$$
|
||||||
|
trap 'rm -rf $unpackdir' 0 1 2 15
|
||||||
|
|
||||||
|
for rpm; do
|
||||||
|
name=`$RPM -qp $rpm --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n'`
|
||||||
|
mkdir $unpackdir || exit
|
||||||
|
$RPM2CPIO "$rpm" | {
|
||||||
|
cd $unpackdir
|
||||||
|
$CPIO -i -d --no-absolute-filenames -uv '*.so.*' '*.so' 2>&1 |
|
||||||
|
while read file b; do
|
||||||
|
test x"$b" = x || break
|
||||||
|
case "$file" in
|
||||||
|
*.so.[0-9]*) $OBJDUMP --dynamic-syms $file ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
} > $name.dynsym
|
||||||
|
echo wrote $name.dynsym for $rpm
|
||||||
|
rm -rf $unpackdir
|
||||||
|
done
|
Reference in New Issue
Block a user