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]

Re: Versioning mess proved!!!


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.

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