9 # list symbol info in tab separated format:
10 # name versioning type visibility addr size Ndx lib
12 readelf -W -d -s $1 |awk -v lib=$1 '
13 /^ *[0-9]*:/ && $5 != "LOCAL" && $7 !~ /UND|ABS/ {
18 print $8 "\t" ver "\t" $4 "\t" $5 "\t" $2 "\t" $3 "\t" $7 "\t" lib
23 syms $M/libc.so >$D/so_syms_musl
27 done <<EOF | sort >$D/so_syms_glibc
48 awk -F'\t' '{print $1}' $D/so_syms_glibc |uniq >$D/so_syms_glibc_1
49 awk -F'\t' '{print $1}' $D/so_syms_musl |uniq >$D/so_syms_musl_1
51 # difference between musl and glibc symbols
52 diff $D/so_syms_glibc_1 $D/so_syms_musl_1 >$D/so_syms_1.diff
53 sed -n '/^< /s/< //p' $D/so_syms_1.diff >$D/so_syms_glibc_1_extra
54 sed -n '/^> /s/> //p' $D/so_syms_1.diff >$D/so_syms_musl_1_extra
56 # select symbol info of extra symbols only
60 while (getline < syms == 1)
66 selsym $D/so_syms_glibc $D/so_syms_glibc_1_extra >$D/so_syms_glibc_extra
67 selsym $D/so_syms_musl $D/so_syms_musl_1_extra >$D/so_syms_musl_extra