This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Binary compatibility loss regarding errno
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Roland McGrath <roland at redhat dot com>
- Cc: "H. J. Lu" <hjl at lucon dot org>, Daniel Jacobowitz <drow at mvista dot com>, libc-alpha at sources dot redhat dot com
- Date: Sun, 29 Dec 2002 20:46:56 +0100
- Subject: Re: Binary compatibility loss regarding errno
- References: <20021227133903.A5805@lucon.org> <200212272147.gBRLljq25869@magilla.sf.frob.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Dec 27, 2002 at 01:47:45PM -0800, Roland McGrath wrote:
Content-Description: message body text
> > On Fri, Dec 27, 2002 at 01:09:48PM -0800, Roland McGrath wrote:
> > > I consider this an ld bug. It's invalid to produce other than an
> > > R_386_GLOB_DAT reloc for a data object that is exported at runtime.
> >
> > If you have a small testcase, I will take a look.
>
> $ gcc -shared -o loser.so loser.c -Wl,--version-script=loser.v
> $ readelf -r loser.so
>
> Note no reloc using the symbol `x'.
>
Content-Description: C source file for ld bug test case
> int x;
> asm(".symver x,x@VERS_1");
> int foo() { return x; }
Content-Description: version script for ld bug test case
> VERS_1 {
> x; foo;
> };
One more point to the testcase. At least it should be
int x __attribute__((section (".bss")));
- COMMON symbols cannot have aliases (although it is not
diagnosed by assembler). If there are:
x: 00000004 4 OBJECT GLOBAL DEFAULT COM x
y: 00000004 4 OBJECT GLOBAL DEFAULT COM x@VERS_1
symbols in ET_REL object, they mean different objects,
not the same one. glibc is already doing this with errno, it
was just missing from the testcase.
Jakub