This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Versioning mess proved!!!
- To: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Subject: Re: Versioning mess proved!!!
- From: Ulrich Drepper <drepper at redhat dot com>
- Date: 03 Oct 2000 08:47:49 -0700
- 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> <m3wvfrkee6.fsf@otr.mynet.cygnus.com><200010021911.MAA23539@geoffk.org><00100317283600.02013@enzo.bigblue.local>
- Reply-To: drepper at cygnus dot com (Ulrich Drepper)
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.
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------