linux-mips
[Top] [All Lists]

RE: [uClibc] Re: uclibc mips ld.so and undefined symbols withnonzerosymb

To: "Bradley D. LaRonde" <brad@laronde.org>, "Richard Sandiford" <rsandifo@redhat.com>
Subject: RE: [uClibc] Re: uclibc mips ld.so and undefined symbols withnonzerosymbol table entry st_value
From: "Joakim Tjernlund" <joakim.tjernlund@lumentis.se>
Date: Tue, 11 May 2004 09:27:42 +0200
Cc: <uclibc@uclibc.org>, <linux-mips@linux-mips.org>
Importance: Normal
In-reply-to: <JPEALJAFNGDDLOPNDIEEMEELCIAA.joakim.tjernlund@lumentis.se>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
> > Changing the alias for __phtread_once to
> > extern int __phtread_once(void) __attribute__ ((weak));
> > makes st_value=0 in libc, making the entry
> > look the same as in glibc.
> 
> hmm, this is not quite true. The binding in glibc is WEAK, but
> the above trick makes the binding GLOBAL in uClibc.

__phtread_once becoms WEAK if add "weak_function" to the
declaration in libc/inet/rpc/rpc_thread.c:
      extern weak_function int __pthread_once (pthread_once_t *__once_control,
                           void (*__init_routine) (void));
and remove the it compleatly from libc/misc/pthread/weaks.c
 
Now __phtread_once matches glibc, execpt for the reloc type. In glibc
you get a R_PPC_GLOB_DAT and in uClibc a R_PPC_ADDR32. Don't think that matters.

Is it desirable to match the pthread_ functions with glibc?
I havn't tried to run any code with these changes, so I have no
idea if it actually works.

 Jocke

<Prev in Thread] Current Thread [Next in Thread>