This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Version script help needed


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]