From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 21 Aug 2006 19:19:46 +0400 From: Alexey Tourbin To: ALT Devel discussion list Message-ID: <20060821151946.GG8500@localhost.localdomain> Mail-Followup-To: ALT Devel discussion list References: <20060808024052.GA32293@mash.office.altlinux.ru> <20060808115026.GX27285@osdn.org.ua> <20060808123044.GB21964@basalt.office.altlinux.org> <20060808183618.GC16715@localhost.localdomain> <20060808220342.GD16715@localhost.localdomain> <20060808231659.GA11505@basalt.office.altlinux.org> <20060813165915.GQ24054@localhost.localdomain> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Cgrdyab2wu3Akvjd" Content-Disposition: inline In-Reply-To: <20060813165915.GQ24054@localhost.localdomain> Subject: Re: [devel] rpmelfsymv 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: Mon, 21 Aug 2006 15:20:00 -0000 Archived-At: List-Archive: List-Post: --Cgrdyab2wu3Akvjd Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 13, 2006 at 08:59:15PM +0400, Alexey Tourbin wrote: > > =F4=C1=CB=C9=CD =CF=C2=D2=C1=DA=CF=CD, =CE=D5=D6=CE=CF =C9=D3=D0=CF=CC= =D8=DA=CF=D7=C1=D4=D8 objdump -wT =D7=CD=C5=D3=D4=CF nm -D. >=20 > =F7=CF=D4 =D4=C1=CB =D7=D2=CF=C4=C5 =D2=C1=C2=CF=D4=C1=C5=D4. >=20 > --- /home/at/cvs/qa/qa-robot/rpmelfsym 2006-05-27 11:15:29 +0000 > +++ /home/at/cvs/qa/qa-robot/rpmelfsymv 2006-08-13 16:57:32 +0000 > @@ -1,17 +1,39 @@ > #!/bin/sh -ef > export LC_ALL=3DC > =20 > -rpmelfsym() > +rpmelfsymv() > { > rpmfile "$1" >files > awk -F'\t' '$NF~/ELF.*(dynamic|shared)/{printf"./%s\0",$1}' files >elfs0 > [ -s elfs0 ] || return 0 > - rpmpeek "$1" xargs -r0 nm -Do nm.out > - awk '{OFS=3D"\t";sub("^./","",$1);sub(":[0-9a-fA-F]*$","",$1);print}' n= m.out > + rpmpeek "$1" xargs -r0 objdump -Tw objdump.out > + perl -ln - objdump.out <<'__EOF__' > +#!/usr/bin/perl=09 > + if (/^$/ or /^DYNAMIC SYMBOL TABLE:$/) { next; } > + if (s/:\s+file format.+//) { s[^./][]; $f =3D $_; next; } > +BEGIN { $x =3D qr/([a-f0-9]+)/; $w =3D qr/(\w+)/; $S =3D qr/(\S+?)/; $s = =3D qr/[ ]+/; } > +BEGIN { %T =3D qw(.text T .data D .bss B .rodata R .data.rel.ro D *ABS* = A *UND* U > + .init T .fini T __libc_freeres_fn T __libc_thread_freeres_fn T > + .interp R text.hot T text.unlikely T); } > + if (/^$x$s(?:$w$s)?$w$s$S\t$x$s(?:[(]?$S[)]?$s)?(?:[.0]$w$s)?$S$/) { > + $vis =3D $2; $typ =3D $4; $abi =3D $6; $sym =3D $8; > + next if $vis eq "l"; > + $t =3D $T{$typ} or die "$f: $sym: unknown type $typ\n"; > + $vis eq "w" and $t eq "U" and $t =3D "w" or > + $vis eq "w" and $t .=3D "W"; > + $abi =3D "-" if $abi eq "" or $abi eq "Base"; > + print "$f\t$t\t$sym\t$abi"; > + next; > + } > + if (/^$x$s(?:$w$s)?$w$s$S\t$x$s$/) { > + next; > + } > + die "bad objdump output:\n$_"; > +__EOF__ > } =EF=C4=CE=C1=CB=CF $ rpmpeek libxfce4util-4.2.3.2-alt1.1.i586.rpm objdump -Tw ./usr/lib/libxfc= e4util.so.1.0.9 |fgrep -m1 -C1 .xfce.LICENSES 00009380 l d .rodata 00000000 .rodata 0000a220 l d .xfce.LICENSES 00000000 .xfce.LICENSES 0001501c l d .eh_frame 00000000 .eh_frame $ =F4=C9=D0 =D3=C9=CD=D7=CF=CC=C1 -- .xfce.LICENSES! =FE=D4=CF =DC=D4=CF =DA= =C1 =D3=C1=CD=CF=C4=C5=D1=D4=C5=CC=D8=CE=CF=D3=D4=D8? --Cgrdyab2wu3Akvjd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFE6c8SfBKgtDjnu0YRAgI3AJ9KD5SYYJQ0Jn+BZWNh86CvitNh7QCgtANZ N+cJtsh1dXrPlf1Yrg4Pce4= =5eem -----END PGP SIGNATURE----- --Cgrdyab2wu3Akvjd--