Binary compatibility loss regarding errno
Roland McGrath
roland@redhat.com
Mon Dec 30 13:39:00 GMT 2002
> 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.
More information about the Libc-alpha
mailing list