public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* x86 cross toolchain and pthread_* weak symbols
@ 2009-11-30 21:12 Lionel Landwerlin
  2009-11-30 21:51 ` Martin Guy
  2009-11-30 23:56 ` Mike Frysinger
  0 siblings, 2 replies; 4+ messages in thread
From: Lionel Landwerlin @ 2009-11-30 21:12 UTC (permalink / raw)
  To: crossgcc

Hi all,

I'm using crosstool-ng to generate a cross toolchain for an x86 target
(nothing too exciting...) and I'm kind of disappointed because I get
some pthread_* weak symbols inside my toolchain :

/opt/cross_x86/i686-cm-linux-gnu/lib/libdl-2.10.2.so
         w __pthread_getspecific
         w __pthread_key_create
         w __pthread_once
         w __pthread_setspecific

I'm wondering why I don't have these weak symbols on my host system
(debian unstable) which is an x86 too, and using the same toolchain
(both using gcc-4.3.4 + eglibc-2.10/nptl, but binutils 2.19 in my cross
toolchain, 2.20 on my host system).

Thanks for your responses.

Regards,

-- 
Lionel Landwerlin


--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: x86 cross toolchain and pthread_* weak symbols
  2009-11-30 21:12 x86 cross toolchain and pthread_* weak symbols Lionel Landwerlin
@ 2009-11-30 21:51 ` Martin Guy
  2009-11-30 22:20   ` Lionel Landwerlin
  2009-11-30 23:56 ` Mike Frysinger
  1 sibling, 1 reply; 4+ messages in thread
From: Martin Guy @ 2009-11-30 21:51 UTC (permalink / raw)
  To: crossgcc

On 11/30/09, Lionel Landwerlin <llandwerlin@gmail.com> wrote:
>  I'm using crosstool-ng to generate a cross toolchain for an x86 target
>  (nothing too exciting...) and I'm kind of disappointed because I get
>  some pthread_* weak symbols inside my toolchain :
>
>  /opt/cross_x86/i686-cm-linux-gnu/lib/libdl-2.10.2.so
>          w __pthread_getspecific
>          w __pthread_key_create
>          w __pthread_once
>          w __pthread_setspecific
>
>  I'm wondering why I don't have these weak symbols on my host system
>  (debian unstable) which is an x86 too, and using the same toolchain
>  (both using gcc-4.3.4 + eglibc-2.10/nptl, but binutils 2.19 in my cross
>  toolchain, 2.20 on my host system).

Does that cause any disfunction or is it just annoying?

   M

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: x86 cross toolchain and pthread_* weak symbols
  2009-11-30 21:51 ` Martin Guy
@ 2009-11-30 22:20   ` Lionel Landwerlin
  0 siblings, 0 replies; 4+ messages in thread
From: Lionel Landwerlin @ 2009-11-30 22:20 UTC (permalink / raw)
  To: crossgcc

Le lundi 30 novembre 2009 à 21:51 +0000, Martin Guy a écrit :
> On 11/30/09, Lionel Landwerlin <llandwerlin@gmail.com> wrote:
> >  I'm using crosstool-ng to generate a cross toolchain for an x86 target
> >  (nothing too exciting...) and I'm kind of disappointed because I get
> >  some pthread_* weak symbols inside my toolchain :
> >
> >  /opt/cross_x86/i686-cm-linux-gnu/lib/libdl-2.10.2.so
> >          w __pthread_getspecific
> >          w __pthread_key_create
> >          w __pthread_once
> >          w __pthread_setspecific
> >
> >  I'm wondering why I don't have these weak symbols on my host system
> >  (debian unstable) which is an x86 too, and using the same toolchain
> >  (both using gcc-4.3.4 + eglibc-2.10/nptl, but binutils 2.19 in my cross
> >  toolchain, 2.20 on my host system).
> 
> Does that cause any disfunction or is it just annoying?
> 
>    M
> 

Well, after I built my toolchain, I started playing a little with
buildroot. I did build a rootfs with it, containing directfb.
Every directfb application I launched used to crash early in the
initialization of directfb. After launching gdb on a directfb example, I
found that the process was crashing with its pc at 0x0. The previous
function in the stack was pthread_once. The address of the pthread_once
symbol in the process was wrong (that's what I though first), it was
inside the mapped code of libdl.so, instead of the mapped code of
libpthread.
Finally I found these weak symbols all over the toolchain.

The stack was something like that :

0x0
pthread_once
dlopen

(I will provide stack trace later)

Directfb examples'/applications' are the only binary crashing as
described. But I didn't build a lot of packages and directfb might be
the only binary using dlopen in my setup.

Regards,

-- 
Lionel Landwerlin


--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: x86 cross toolchain and pthread_* weak symbols
  2009-11-30 21:12 x86 cross toolchain and pthread_* weak symbols Lionel Landwerlin
  2009-11-30 21:51 ` Martin Guy
@ 2009-11-30 23:56 ` Mike Frysinger
  1 sibling, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2009-11-30 23:56 UTC (permalink / raw)
  To: crossgcc; +Cc: Lionel Landwerlin

[-- Attachment #1: Type: Text/Plain, Size: 896 bytes --]

On Monday 30 November 2009 16:12:08 Lionel Landwerlin wrote:
> I'm using crosstool-ng to generate a cross toolchain for an x86 target
> (nothing too exciting...) and I'm kind of disappointed because I get
> some pthread_* weak symbols inside my toolchain :
> 
> /opt/cross_x86/i686-cm-linux-gnu/lib/libdl-2.10.2.so
>          w __pthread_getspecific
>          w __pthread_key_create
>          w __pthread_once
>          w __pthread_setspecific
> 
> I'm wondering why I don't have these weak symbols on my host system
> (debian unstable) which is an x86 too, and using the same toolchain
> (both using gcc-4.3.4 + eglibc-2.10/nptl, but binutils 2.19 in my cross
> toolchain, 2.20 on my host system).

maybe you're comparing apples to oranges.  such weak references make sense if 
you've spent time reading the code in question, and i have them on my host x86 
system.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-30 23:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-30 21:12 x86 cross toolchain and pthread_* weak symbols Lionel Landwerlin
2009-11-30 21:51 ` Martin Guy
2009-11-30 22:20   ` Lionel Landwerlin
2009-11-30 23:56 ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).