From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 19 May 2006 20:09:49 +0400 From: Alexey Tourbin To: devel@lists.altlinux.org Message-ID: <20060519160949.GG26020@localhost> Mail-Followup-To: devel@lists.altlinux.org References: <20060519011133.GA18603@mash.office.altlinux.ru> <200605191752.14541.thresh@altlinux.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Enx9fNJ0XV5HaWRu" Content-Disposition: inline In-Reply-To: <200605191752.14541.thresh@altlinux.ru> Subject: Re: [devel] [Sisyphus-cybertalk] I: Sisyphus-20060519 dup_elf_symbols: +55 -46 (57838) X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.7 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2006 16:08:30 -0000 Archived-At: List-Archive: List-Post: --Enx9fNJ0XV5HaWRu Content-Type: multipart/mixed; boundary="iJXiJc/TAIT2rh2r" Content-Disposition: inline --iJXiJc/TAIT2rh2r Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 19, 2006 at 05:52:07PM +0400, Pavlov Konstantin wrote: > > 55 NEW dup_elf_symbols added to the list > > ffmpeg /usr/bin/ffmpeg fftv /usr/bin/ffmpeg-fftv 2 > =C9 =D0=D2=CF=DE=C5=C5, =D7=D0=CF=CC=CE=C5 =CE=CF=D2=CD=C1=CC=D8=CE=CF = =D3 =D5=DE=C5=D4=CF=CD =C4=D5=C2=CC=C5=D6=C1 =CB=CF=C4=C1 ffmpeg. =E5=C7=CF= =D0=CF=DE=D4=C9 =D7=D3=C5 =D4=C1=D3=CB=C1=C0=D4=20 > =D3 =D3=CF=C2=CF=CA. =EB=D3=D4=C1=D4=C9, 2 -- =DC=D4=CF =D3=CC=C9=DB=CB=CF=CD =CD=C1=CC=CF, =CE= =C1 =D5=D2=CF=D7=CE=C5 =CB=C1=D6=C9=CD=CF=D3=D4=C9, =C1 8 -- =DC=D4=CF =D3= =CC=C9=DB=CB=CF=CD =CD=CE=CF=C7=CF, =D0=D2=C9=CD=C5=D2=CE=CF =CB=C1=CB =CD=CF=CC=CF=D4=CB=CF= =CD =D0=CF =C7=CF=CC=CF=D7=C5. =F2=C1=DA=DF=D1=D3=CE=C5=CE=C9=C5 =D0=D2=C9= =C1=D4=D4=C1=DE=C5=CE=CF. > > liballegro /usr/lib/liballeg-4.2.0.so atanks /usr/games/atanks 8 > > liballegro /usr/lib/liballeg-4.2.0.so dumb_0.9.2 /usr/bin/dumbplay 8 --iJXiJc/TAIT2rh2r Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=dup_elf_symbols #!/bin/sh -ef export LC_ALL=C cd "${workdir:?}" [ -n "$*" ] || set -- -ap rpmelfsym "$@" >sym awk -F'\t' '$3~/[DT]/' sym >def sort -t$'\t' -k4 -o def def # avoid most frequent symbols nelf=`sort -u -k2,2 def |wc -l` cut -f4 def |uniq -cd |sort -n >freq awk -v n=$nelf '$1defsym 3<<'__EOF__' __cxa_ __cxxabiv1 __gnu_cxx __gxx_personality ^__dynamic_cast$ ^_Znwj$ ^_ZdlPv$ ^_Znaj$ ^_ZdaPv$ ^_ZNSt[0-9] ^_ZNKSt[0-9] ^_ZSt[0-9] ^_Unwind_ ^__register_frame ^yy[a-z_] __EOF__ sort -o defsym -u defsym join -t$'\t' -14 -21 -o '1.1 1.2 1.3 1.4' def defsym >xdef # product ::= pkg1 elf1 pkg2 elf2 symtype symname join -t$'\t' -j 4 -o '1.1 1.2 1.3 2.1 2.2 2.3 0' xdef xdef | awk -F'\t' 'function prio(f) { if (f~"^/lib/lib[^/]+[.]so[^/]*$") return 1 if (f~"^/usr/lib/lib[^/]+[.]so[^/]*$") return 2 if (f~"^/usr/X11R./lib/lib[^/]+[.]so[^/]*$") return 3 if (f~"lib/lib[^/]+[.]so[^/]*$") return 4 if (f~"/lib[^/]+[.]so[^/]*$") return 5 if (f~"[^/][.]so[^/]*$") return 6 return 9 } ($2<$5 && $3==$6) { OFS="\t" pd = prio($2)-prio($5) if (pd<0 || pd==0 && length($2)<=length($5)) print $1,$2,$4,$5,$6,$7 else print $4,$5,$1,$2,$6,$7 }' >product # suspect ::= pkg1 elf1 pkg2 elf2 log2(nsym) # I need logarithmic scale here to facilitate diffing # 3-5 symbols (approx. 4) log2 = 2 # 6-11 symbols (approx. 8) log2 = 3 # 12-22 symbols (approx. 16) log2 = 4 # 23-45 symbols (approx. 32) log2 = 5 # 46-90 symbols (approx. 64) log2 = 6 # 91-181 symbols (approx. 128) log2 = 7 # 182-362 symbols (approx. 256) log2 = 8 cut -f-4 product |sort |uniq -cd |sed 's/^ *\([0-9]\+\) \+\(.\+\)$/\2\t\1/' | awk -F'\t' 'BEGIN{OFS=FS}($NF=int(log($NF)/log(2)+0.5))>1' >suspect sort -o suspect -u suspect cat suspect cd - >/dev/null --iJXiJc/TAIT2rh2r-- --Enx9fNJ0XV5HaWRu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFEbe3NfBKgtDjnu0YRAoHbAJwOiVItxT2dhGxri2pHMLwwUuowYQCffiPr t/BwnCYOkGryXFzHNcYGl7w= =YjGP -----END PGP SIGNATURE----- --Enx9fNJ0XV5HaWRu--