errno definition broken in non-threaded code

Mike Frysinger vapier at gentoo.org
Mon Sep 25 11:14:19 PDT 2006


On Saturday 23 September 2006 02:02, Jim Blandy wrote:
> I'm beginning to think libc_hidden_proto and libc_hidden_def can't be
> used for errno in non-threaded configurations, without a change to the
> way errno is defined for user code.  Trunk revision r13360 may not be
> quite right.

user code should not be accessing errno directly ... that is the point of the 
__errno_location() function ...

> On the trunk, configured with no thread support, I'm seeing a number
> of test failures related to errno not being set properly.  For
> instance, test/inet/bug-if1.c fails, saying that errno is zero instead
> of the expected value, ENXIO.  (My target is ARM Linux, but as far as
> I can see that shouldn't matter.)

the target arch does matter ... if you look at the binutils list, there's a 
thread about handling hidden references to data and how on some architectures 
it works while on others it def does not work ... and it all comes down to 
relocations

the arches that fail utilize copy relocs and thus each relocated section gets 
its own copy of the data

personally i still think this is a bug in binutils, but Alan Modra says it 
isnt and i certainly dont have enough technical knowledge to take him on
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
Url : http://busybox.net/lists/uclibc/attachments/20060925/4a9e42b5/attachment.pgp 


More information about the uClibc mailing list