Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Apr 2005 07:16:26 +0800
From:      David Xu <davidxu@freebsd.org>
To:        Daniel Eischen <deischen@freebsd.org>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: libpthread version bump
Message-ID:  <426985CA.30003@freebsd.org>
In-Reply-To: <Pine.GSO.4.43.0504221722430.24214-100000@sea.ntplx.net>
References:  <Pine.GSO.4.43.0504221722430.24214-100000@sea.ntplx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Daniel Eischen wrote:

>On Fri, 22 Apr 2005, Daniel Eischen wrote:
>
>  
>
>>On Fri, 22 Apr 2005, Peter Wemm wrote:
>>
>>    
>>
>>>#2 can also make it a little easier to run 5.x i386 binaries on amd64 -
>>>we could kill of most of those nasty ifdefs.
>>>
>>>#1 would end up something like:
>>>  #pragma weak i386_set_gsbase
>>>  #pragma weak i386_get_gsbase
>>>  static void (*have_get_gsbase)(void) = i386_get_gsbase;
>>>  static void (*have_set_gsbase)(void *) = i386_set_gsbase;
>>>  if (have_i386_get_gsbase == NULL || have_get_gsbase() == -1) {
>>>    use_ldt();
>>>  } else {
>>>    use_gsbase();
>>>  }
>>>I think that is sufficient to test if the symbols are present and test
>>>if they work at runtime...
>>>      
>>>
>>I worked up a quick patch.  It compiles, but it will be some time
>>before I can try it.
>>
>>  http://people.freebsd.org/~deischen/kse/libpthread.diffs
>>    
>>
>
>Note that I also slightly prefer #2, since you would have to make
>the #pragma weak hacks to both libpthread and libthr.
>
>  
>
I won't support LDT based TLS,  so you don't have to patch it.

David Xu



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?426985CA.30003>