summaryrefslogtreecommitdiffstats
path: root/testsuite/scripts/gnu-debugaltlink-name.sh
blob: 667c5fdc3ca0637bd643f3bfb274af2ceb26186b (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

if ! readelf -S $1 | grep -q '\.gnu_debugaltlink'; then
    exit
fi

readelf \
    --string-dump=.gnu_debugaltlink \
    $1 \
    | grep -a '\[[ 	]*0\]' \
    | sed 's/.*0\]  //'