This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc 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: Binary compatibility loss regarding errno


> I believe ld works as expected. 

That is barely meaningful to say, since the behavior of these cases is so
undocumented and ill-specified.  It sure isn't what I expect.  

> Basically
> 
> int foo() { return x; }
> 
> will use the definition of `x', which is the original symbol, not the
> versioned one. 

That's a reasonable interpretation in the abstract, but it's unworkable.

> Please try
> 
> extern int x;
> int _x __attribute__((section (".bss")));
> asm(".symver _x,x@VERS_1");
> int foo() { return x; }

That produces an undefined reference to unversioned `x'.

> When you use `.symver NAME,NAME2@NODENAME', NAME should be different
> from NAME2. Otherwise, you will get many surprises.

A specification of "expect surprises" is just not useful.  If it doesn't
work in a consistent, well-defined way, then it must be disallowed.


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