This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Versioning mess proved!!!
- To: Ulrich Drepper <drepper at redhat dot com>
- Subject: Re: Versioning mess proved!!!
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Date: Tue, 3 Oct 2000 21:24:01 +0200
- Cc: Geoff Keating <geoffk at cygnus dot com>,philb at gnu dot org,howarth at fuse dot net,libc-alpha at sourceware dot cygnus dot com,aj at suse dot de
- References: <39D50E20.263F646F@fuse.net> <00100317283600.02013@enzo.bigblue.local> <m3zokmdize.fsf@otr.mynet.cygnus.com>
On Tue, 03 Oct 2000, Ulrich Drepper wrote:
> Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:
> > int main(void)
> > {
> > extern void foo (void) __attribute__ ((weak));
> > void (*foop) (void) = foo;
> > printf ("%p\n", foop);
> > if (foop)
> > foop();
> > return 0;
> > }
>
> What if you change this to
>
> extern void foo (void) __attribute__ ((weak));
> void (*foop) (void) = foo;
> asm volatile ("" : "=r" (foop) : "0" (foop));
> printf ("%p\n", foop);
> if (foop)
> foop();
> return 0;
>
> (note the asm). If this fails, please show me the generated asm code.
As Jack wrote, this makes no difference, but changing the last compile line
brings us even close to the behaviour I've seen with zlib:
gcc tA-22.c -fpic -Wl,-v -L213 -ltB -o tA
Can you please tell me what "objdump -xTR tA|grep foo" and
"readelf -a -tA|grep foo" give you on the platforms you have access to?
Franz.