[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

__thread errno (was: [SCM] glibc maintenance branch, tschwinge/Roger_Whi

From: Thomas Schwinge
Subject: __thread errno (was: [SCM] glibc maintenance branch, tschwinge/Roger_Whittaker, updated. glibc-2.12-3577-g5b1f2ae)
Date: Thu, 10 May 2012 09:17:33 +0800
User-agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu)

Hi Samuel!

On Thu, 10 May 2012 00:10:52 +0000, Samuel Thibault 
<samuel.thibault@ens-lyon.org> wrote:
> The branch, tschwinge/Roger_Whittaker has been updated

> commit d0dcb9e7be5d08ef0ecb486988331b9120a407e1
> Merge: e248bd0 b7f913c
> Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
> Date:   Fri Apr 27 05:54:15 2012 +0200
>     Merge branch 't/tls-threadvar' into 
> refs/top-bases/tschwinge/Roger_Whittaker

I'm not seeing the updated t/tls-threadvar branch; please push.

> commit b7f913cb1bdf9ca718661af315b9f344dc77ebe8
> Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
> Date:   Fri Apr 27 05:42:42 2012 +0200
>     Move errno to TLS
>     * sysdeps/mach/hurd/errno-loc.c: Remove file.
>     * sysdeps/mach/hurd/errno.c: Remove file.
>     * sysdeps/mach/hurd/dl-sysdep.c (errno): Remove variable.

This breaks ABI compatibility, doesn't it?

On a current system:

    $ echo -e '#include <errno.h>\nint e(){return errno;}' | gcc -S -o - -O -x 
c -
            .file   ""
            .globl  e
            .type   e, @function
            subl    $12, %esp
            .cfi_def_cfa_offset 16
            call    __errno_location
            movl    (%eax), %eax
            addl    $12, %esp
            .cfi_def_cfa_offset 4
            .size   e, .-e
            .ident  "GCC: (Debian 4.6.3-1+hurd.3) 4.6.3"
            .section        .note.GNU-stack,"",@progbits

But I think solving this is easy, too: just return the __thread &errno
From __errno_location (and un-export that symbol for later glibc
versions).  But this is for a later time, I'd say.

Also, I plan to move some bits of the t/tls branch into t/tls-threadvar:
t/tls should just add the mechanism for TLS (should be pushed upstream
soon), and t/tls-threadvar switches from Hurd threadvar to TLS (can go in
later).  Makes sense to you?


Attachment: pgpE6Mhmc1I6C.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]