From: "罗勇刚(Yonggang Luo)" <luoyonggang@gmail.com>
To: Musl <musl@lists.openwall.com>
Cc: mesa-dev@lists.freedesktop.org
Subject: Re: [musl] Fwd: mesa | Remove USE_ELF_TLS macro (!17213)
Date: Sat, 25 Jun 2022 13:25:31 +0800 [thread overview]
Message-ID: <CAE2XoE9pnYnYTDmhRkho=1tB06Z-A6qNyuwhQ0acF6iH93t7aA@mail.gmail.com> (raw)
In-Reply-To: <20220625044724.GB2408@voyager>
[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]
On Sat, Jun 25, 2022 at 12:47 PM Markus Wichmann <nullplan@gmx.net> wrote:
>
> On Sat, Jun 25, 2022 at 11:36:09AM +0800, 罗勇刚(Yonggang Luo) wrote:
> > So I am confused. What's the situation about ELF-TLS support in musl?
> > Is that still broken now?
>
> musl has always supported ELF-TLS anywhere except in libc itself. That
> was also never the problem. The problem was that the mesa people select
> the initial-exec TLS model explicitly, even though libGL ends up being
> dlopen()ed quite often, and then you should be using the general-dynamic
> model instead.
My question is does musl support ELS-TLS when using dl-open.
>
> According to [1], Rich proposed dropping the initial-exec attribute and
> replacing it with -mtls-dialect=gnu2 eight years ago. Has that happened
> yet? If so, dlopen()ing libGL with musl ought to work.
`initial-exec` are only specified for __GLIBC__, If musl not predefined
macro ` __GLIBC__`
```
#if defined(__GLIBC__)
#define __THREAD_INITIAL_EXEC thread_local
__attribute__((tls_model("initial-exec")))
#define REALLY_INITIAL_EXEC
#else
#define __THREAD_INITIAL_EXEC thread_local
#endif
```
>
> Ciao,
> Markus
>
> [1] https://gitlab.freedesktop.org/mesa/mesa/-/issues/966
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
[-- Attachment #2: Type: text/html, Size: 1720 bytes --]
next prev parent reply other threads:[~2022-06-25 5:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <merge_request_66288@gitlab.freedesktop.org>
[not found] ` <note_1441630@gitlab.freedesktop.org>
[not found] ` <note_1442039@gitlab.freedesktop.org>
[not found] ` <note_1442291@gitlab.freedesktop.org>
2022-06-25 3:36 ` 罗勇刚(Yonggang Luo)
2022-06-25 4:47 ` Markus Wichmann
2022-06-25 5:25 ` 罗勇刚(Yonggang Luo) [this message]
2022-06-25 5:51 ` Fangrui Song
2022-06-25 9:48 ` Szabolcs Nagy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAE2XoE9pnYnYTDmhRkho=1tB06Z-A6qNyuwhQ0acF6iH93t7aA@mail.gmail.com' \
--to=luoyonggang@gmail.com \
--cc=mesa-dev@lists.freedesktop.org \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).