From: "Dmitry V. Levin" <ldv@altlinux.org> To: ALT Devel discussion list <devel@lists.altlinux.org> Subject: Re: [devel] rpmelfsymv Date: Wed, 9 Aug 2006 03:16:59 +0400 Message-ID: <20060808231659.GA11505@basalt.office.altlinux.org> (raw) In-Reply-To: <20060808220342.GD16715@localhost.localdomain> [-- Attachment #1: Type: text/plain, Size: 1912 bytes --] On Wed, Aug 09, 2006 at 02:03:42AM +0400, Alexey Tourbin wrote: > On Tue, Aug 08, 2006 at 10:36:18PM +0400, Alexey Tourbin wrote: > > On Tue, Aug 08, 2006 at 04:30:44PM +0400, Dmitry V. Levin wrote: > > > На старом libgcc не запустится: > > > $ rpmquery -pR FlightGear-0.9.10-alt1.i586.rpm |fgrep libgcc > > > libgcc_s.so.1(GCC_3.0) > > > libgcc_s.so.1(GCC_4.0.0) > > > > > > На конференции Алексею пеняли, что его робот не учитывает versioning. > > Понимаешь в чем дело. Есть несколько проблем, которые всё усложняют. > Вот первая из них: > > > Что нужно использовать вместо nm -D, чтобы получить отношение > > <типа символа> <символ> <версия символа> ? > > Почему-то мне хочется сохранить однобуквенное обозначение типа символа, > как в nm -D. При этом нужно добавить в таблицу ещё одно поле, в > котором будет версия символа (или прочерк, если версии нет). В общем случае этого сделать нельзя. [...] > Внимание, вопрос: могут ли два одинаковых символа с разными версиями > иметь разные типы? Т.е. symbol@LIB_1.0 -- T (функция), symbol@LIB_1.1 -- > D (переменная). Ничто, кроме здравого смысла, не мешает так сделать: $ cat v.c int old_foo; void new_foo(void) {} __asm__(".symver old_foo,foo@V1"); __asm__(".symver new_foo,foo@@V2"); $ cat v.map V1 { global: foo; local: old_foo; }; V2 { global: foo; local: new_foo; }; $ gcc -fpic -shared -nostartfiles -nostdlib -Wl,--version-script,v.map -s -o v.so v.c $ objdump -wT v.so |fgrep foo 000012cc g DO .bss 00000004 (V1) foo 00000248 g DF .text 00000005 V2 foo > Как тогда правильно соединить тип и версию? Тип экспортируемого символа - это его неотъемлемая часть, так же как имя и версия. > И какой тип на самом деле показывает nm -D? $ nm -D v.so |fgrep foo 000012cc B foo 00000248 T foo Таким образом, нужно использовать objdump -wT вместо nm -D. -- ldv [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-08-08 23:16 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 [this message] 2006-08-13 16:59 ` Alexey Tourbin 2006-08-21 15:19 ` Alexey Tourbin 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=20060808231659.GA11505@basalt.office.altlinux.org \ --to=ldv@altlinux.org \ --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