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 Samstag, 3. August 2002 18:33, H. J. Lu wrote:
> On Sat, Aug 03, 2002 at 05:57:37PM +0200, Franz Sirl wrote:
> > One thing makes me wonder though, if I use .symver and a version script,
> > why are versioned symbols matched? E. if I use .symver and the following
> > version script
> >
> > VEROLD {
> >      local:
> >      *;
> > };
> >
> > VERNEW {
> >      local:
> >      *;
> > } VEROLD;
> >
> > divdi3@VEROLD and divdi3@@VERNEW will be changed from GLOBAL scope to
> > LOCAL scope. On the other side version scripts prevent me from from using
> > versioned symbols in there? Is this the right behaviour?
>
> I don't see there is a problem.

Hmm, I seem to miss the logic then. If you don't strip mylibgcc2.so, you'll 
see:

[fsirl@enzo:~/test-versioning]$ readelf -a mylibgcc2.so|grep divdi3
    31: 00000708    36 FUNC    GLOBAL DEFAULT    9 divdi3@@VERNEW
    69: 00000000     0 FILE    LOCAL  DEFAULT  ABS divdi3-old.c
    70: 00000000     0 FILE    LOCAL  DEFAULT  ABS divdi3-new.c
    78: 000006e4    36 FUNC    LOCAL  DEFAULT    9 divdi3@VEROLD
   190: 000006e4    36 FUNC    LOCAL  DEFAULT    9 divdi3_old
   200: 00000708    36 FUNC    GLOBAL DEFAULT    9 divdi3

So divdi3 got versioned as VEROLD, but it wasn't globalized. On the other hand 
if I mention divdi3 under VEROLD too in the script (and you can't directly 
list divdi3@VEROLD in there), I don't get divdi3 at VERNEW, even though it is 
mentioned there.

I guess what I'm trying to say, why isn't the symbol matching in version 
scripts limited to unversioned symbols and symbols matching the current 
version node for a particular version node?

Franz.


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