This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Version script help needed
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Sat, 3 Aug 2002 07:22:51 -0700
- Subject: Re: Version script help needed
- References: <200208031445.36447@enzo.bigblue.local>
On Sat, Aug 03, 2002 at 02:45:36PM +0200, Franz Sirl wrote:
> Hi,
>
> I'm at a loss with the handling of version scripts. If you look at the
> appended testcase, you'll see that it generates 2 small shared libs with
> versioned symbols:
>
> [fsirl@enzo:~/test-versioning]$ readelf -a mylibgcc1.so|grep divdi3
> 25: 0000068c 36 FUNC GLOBAL DEFAULT 9 divdi3@VEROLD
> [fsirl@enzo:~/test-versioning]$ readelf -a mylibgcc2.so|grep divdi3
> 27: 000006b0 36 FUNC GLOBAL DEFAULT 9 divdi3@@VERNEW
>
> But what I want is both versions in _one_ shared lib like that:
> 25: 0000068c 36 FUNC GLOBAL DEFAULT 9 divdi3@VEROLD
> 27: 000006b0 36 FUNC GLOBAL DEFAULT 9 divdi3@@VERNEW
>
> What am I doing wrong?
>
Read the glibc source :-). Change divdi3-new.c to
---
int divdi3_new (void)
{
return 0;
}
asm (".symver divdi3_new,divdi3@@VERNEW");
---
H.J.