ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] Q: Переименование символов и сохранение ABI
@ 2010-06-06  7:09 Alexey I. Froloff
  2010-06-06 11:06 ` Dmitry V. Levin
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey I. Froloff @ 2010-06-06  7:09 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 952 bytes --]

Апстрим librep переименовал несколько символов не меняя SONAME.
Хочется сохранить ABI.  Раньше оно выглядело так:

$ nm -D /usr/lib/librep.so.9.5.0 | grep file_uid 
000168e0 T Ffile_uid_p
000547c8 B Qfile_uid_p

Собсно, убрали "_p".  Код раскрывается в следующее:

repv Qfile_uid;
repv Ffile_uid(repv arg) { ... }

Делаю alias'ы:

extern __typeof__ (Ffile_uid) Ffile_uid_p __attribute__ ((alias ("Ffile_uid")));
extern __typeof__ (Qfile_uid) Qfile_uid_p __attribute__ ((alias ("Qfile_uid")));


С функцией такой трюк проходит, а с common symbol нет:

{standard input}:6039: Error: `Qfile_uid_p' can't be equated to common symbol 'Qfile_uid'

У этой библиотеки полтора пользователя, но хотелось бы знать как
в принципе решать подобные проблемы.

P.S. Символ Qfile_uid в выводе rpmsodiff(1) не фигурирует.
P.P.S. Погрепал DSOHOWTO, ответа не нашёл.

-- 
Regards,    --
Sir Raorn.   --- http://thousandsofhate.blogspot.com/

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [devel] Q: Переименование символов и сохранение ABI
  2010-06-06  7:09 [devel] Q: Переименование символов и сохранение ABI Alexey I. Froloff
@ 2010-06-06 11:06 ` Dmitry V. Levin
  2010-06-06 17:13   ` Alexey I. Froloff
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry V. Levin @ 2010-06-06 11:06 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 1025 bytes --]

On Sun, Jun 06, 2010 at 11:09:29AM +0400, Alexey I. Froloff wrote:
> Апстрим librep переименовал несколько символов не меняя SONAME.
> Хочется сохранить ABI.  Раньше оно выглядело так:
> 
> $ nm -D /usr/lib/librep.so.9.5.0 | grep file_uid 
> 000168e0 T Ffile_uid_p
> 000547c8 B Qfile_uid_p
> 
> Собсно, убрали "_p".  Код раскрывается в следующее:
> 
> repv Qfile_uid;
> repv Ffile_uid(repv arg) { ... }
> 
> Делаю alias'ы:
> 
> extern __typeof__ (Ffile_uid) Ffile_uid_p __attribute__ ((alias ("Ffile_uid")));
> extern __typeof__ (Qfile_uid) Qfile_uid_p __attribute__ ((alias ("Qfile_uid")));
> 
> 
> С функцией такой трюк проходит, а с common symbol нет:
> 
> {standard input}:6039: Error: `Qfile_uid_p' can't be equated to common symbol 'Qfile_uid'
> 
> У этой библиотеки полтора пользователя, но хотелось бы знать как
> в принципе решать подобные проблемы.

Достаточно превратить common symbol в (un)initialized data.
При этом конструкция вида "int i;" заменяется на "int i = 0;".


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [devel] Q: Переименование символов и сохранение ABI
  2010-06-06 11:06 ` Dmitry V. Levin
@ 2010-06-06 17:13   ` Alexey I. Froloff
  0 siblings, 0 replies; 3+ messages in thread
From: Alexey I. Froloff @ 2010-06-06 17:13 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 294 bytes --]

On Sun, Jun 06, 2010 at 03:06:52PM +0400, Dmitry V. Levin wrote:
> Достаточно превратить common symbol в (un)initialized data.
> При этом конструкция вида "int i;" заменяется на "int i = 0;".
Спасибо, прокатило.

-- 
Regards,    --
Sir Raorn.   --- http://thousandsofhate.blogspot.com/

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-06-06 17:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-06  7:09 [devel] Q: Переименование символов и сохранение ABI Alexey I. Froloff
2010-06-06 11:06 ` Dmitry V. Levin
2010-06-06 17:13   ` Alexey I. Froloff

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