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: Symbol versioning in C++ (two ld bugs)


On Mon, Feb 11, 2002 at 01:58:14PM -0800, Ulrich Drepper wrote:
> Phil Edwards <phil@jaj.com> writes:
> > 
> > So:  which kind of patterns are supposed to be accepted?
> 
> globbing.  regex is too slow and in other package, well glibc, we use
> '*' as a pattern.  This is also what Sun does.

Would a patch to rename lang_new_vers_regex() be acceptable?


> > Bug #2
> > ======
> > The ldlex.l lexer only specifies
> > 
> >         [*?.$_a-zA-Z]([*?.$_a-zA-Z0-9]|::)*
> > 
> > for a version symbol pattern (see V_IDENTIFIER).  No brackets, no ranges,
> > no braces -- that is, we can't even use the globbing patterns that fnmatch()
> > would allow!
> 
> This is more or less encoding the current practice.  No special reason
> to have it like this except that there might be problems with the
> grammar.  Somebody will have to check it.

AFAICT this lexer token is only used in this one place.  As long as it
doesn't match a leading colon or a trailing semicolon there shouldn't be
any grammar conflicts.  I will try some modifications.


> > For the record, std::* is not the only problem; there are other namespaces
> > and other patterns which also need to be exposed (the __cxa_* stuff for
> > example).
> 
> This already works.  __cxa_* is a valid pattern.

Oh, I know, I just hadn't gotten that far.  My point was that we may want
to use globbing patterns more extensive than '*' for other things besides
std::*.  I'm assuming that all of __cxa_* should be exposed and versioned,
but I haven't looked yet.


Thanks,
Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams


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