From: Alexey Tourbin <at@altlinux.ru>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] rpmelfsymv
Date: Mon, 21 Aug 2006 19:19:46 +0400
Message-ID: <20060821151946.GG8500@localhost.localdomain> (raw)
In-Reply-To: <20060813165915.GQ24054@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 2098 bytes --]
On Sun, Aug 13, 2006 at 08:59:15PM +0400, Alexey Tourbin wrote:
> > Таким образом, нужно использовать objdump -wT вместо nm -D.
>
> Вот так вроде работает.
>
> --- /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=C
>
> -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 <elfs0 >nm.out
> - awk '{OFS="\t";sub("^./","",$1);sub(":[0-9a-fA-F]*$","",$1);print}' nm.out
> + rpmpeek "$1" xargs -r0 objdump -Tw <elfs0 >objdump.out
> + perl -ln - objdump.out <<'__EOF__'
> +#!/usr/bin/perl
> + if (/^$/ or /^DYNAMIC SYMBOL TABLE:$/) { next; }
> + if (s/:\s+file format.+//) { s[^./][]; $f = $_; next; }
> +BEGIN { $x = qr/([a-f0-9]+)/; $w = qr/(\w+)/; $S = qr/(\S+?)/; $s = qr/[ ]+/; }
> +BEGIN { %T = 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 = $2; $typ = $4; $abi = $6; $sym = $8;
> + next if $vis eq "l";
> + $t = $T{$typ} or die "$f: $sym: unknown type $typ\n";
> + $vis eq "w" and $t eq "U" and $t = "w" or
> + $vis eq "w" and $t .= "W";
> + $abi = "-" 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__
> }
Однако
$ rpmpeek libxfce4util-4.2.3.2-alt1.1.i586.rpm objdump -Tw ./usr/lib/libxfce4util.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
$
Тип символа -- .xfce.LICENSES! Что это за самодеятельность?
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-08-21 15:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-08 11:50 ` [devel] [Sisyphus-cybertalk] I: Sisyphus-20060808 abi_drifts: +23 -18 (5193) Michael Shigorin
2006-08-08 12:30 ` Dmitry V. Levin
2006-08-08 18:36 ` Alexey Tourbin
2006-08-08 22:03 ` [devel] rpmelfsymv Alexey Tourbin
2006-08-08 23:16 ` Dmitry V. Levin
2006-08-13 16:59 ` Alexey Tourbin
2006-08-21 15:19 ` Alexey Tourbin [this message]
2006-08-08 19:07 ` [devel] [Sisyphus-cybertalk] I: Sisyphus-20060808 abi_drifts: +23 -18 (5193) Michael Shigorin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060821151946.GG8500@localhost.localdomain \
--to=at@altlinux.ru \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git