From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 1443 invoked from network); 25 Jun 2022 05:25:58 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 25 Jun 2022 05:25:58 -0000 Received: (qmail 9273 invoked by uid 550); 25 Jun 2022 05:25:56 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 9238 invoked from network); 25 Jun 2022 05:25:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=PnYROaccAM+XEe/XIOXkh2ve7y4NJFqNmynJXKqvhlQ=; b=U7MJeExOqFsSnxhuFFxFVw7mgbj/Lyl7g6aDuH4itS0yVORJBp54chnmOjImEtlBHY aGgkbe97GlszkD5gYPkopgK4aF/mSIybUYjC6iKFX3mBGTvhyMT8hnOoN9wXWGIJv0Pr QqK+XikCkxEeXdbEMoF4VBcMvZdELRryLpZvGNBB1dYr1naBHtW6MS32wNOTQfu7XvLH iFbbKBLm0yo1t8KB0XxeMEnQ0dr5T4tM6IPtrEdu4w7v5wYkcIhYxKZ55oQZaAItdVbc C5TJxMEriD80AyIZjsF15xZ3P4/FsJ3Wd0G1JFhTpwCN49BsiEQ4mUVIHe6sbzEsdjj0 Oifw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=PnYROaccAM+XEe/XIOXkh2ve7y4NJFqNmynJXKqvhlQ=; b=2jhtbdaarymoobZgu0QAjQgQU5KWfuCpVsMPsxBXkSNptt3D6Xzp3OCU0M8hSCa0uv TbR7BQQ8t4RLnA467kXibGhhd6tEv4WSvQBdTVLNbHxMP/PcuihvPA84FVWqETs9sK1Y s+BOcDXexHJDRJGdwbcQu0kezlx7WeWqRXIJwnCE7Bjfdrtpz4QCyi76ipcdmwILW3oE FemcBVljDgKgOrBqQYxzx3sOwVhPMICG7Pq3D/YDHfFRrzs/V7Oetb9rXKdIPamTghRJ MVowDFjBhrJzi1c4+5LxVJsYVMxt5Vsvoywc8R8I5anR8TElo1RhYK5SdnzkKRuEzB+r R53g== X-Gm-Message-State: AJIora/tIy9Qj4IeuFARHqm0oKhoHP5KEZ72haOWZSVNiCmXdSFf7aN4 chDWIoOfjcLLn/dRBQk05xEBmgSvYQJpXwM4I36iNHLZ22Wx2A== X-Google-Smtp-Source: AGRyM1taNcM7r9kUXfe+VEJojgdhgJKyd1CUmjRQvcCM+qL0uf9Ykq5t3SRs5eaR8TGN8zwPpRCfmXNbWd+D1tNWU/A= X-Received: by 2002:a67:e299:0:b0:354:4825:1210 with SMTP id g25-20020a67e299000000b0035448251210mr893309vsf.7.1656134742966; Fri, 24 Jun 2022 22:25:42 -0700 (PDT) MIME-Version: 1.0 References: <20220625044724.GB2408@voyager> In-Reply-To: <20220625044724.GB2408@voyager> From: =?UTF-8?B?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= Date: Sat, 25 Jun 2022 13:25:31 +0800 Message-ID: To: Musl Cc: mesa-dev@lists.freedesktop.org Content-Type: multipart/alternative; boundary="0000000000000e09cf05e23eeb4e" Subject: Re: [musl] Fwd: mesa | Remove USE_ELF_TLS macro (!17213) --0000000000000e09cf05e23eeb4e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Jun 25, 2022 at 12:47 PM Markus Wichmann wrote: > > On Sat, Jun 25, 2022 at 11:36:09AM +0800, =E7=BD=97=E5=8B=87=E5=88=9A(Yon= ggang 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=3Dgnu2 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 -- =E6=AD=A4=E8=87=B4 =E7=A4=BC =E7=BD=97=E5=8B=87=E5=88=9A Yours sincerely, Yonggang Luo --0000000000000e09cf05e23eeb4e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sat, Jun 25, 2022 at 12:47 PM Markus Wichmann &= lt;nullplan@gmx.net> wrote:
&= gt;
> On Sat, Jun 25, 2022 at 11:36:09AM +0800, =E7=BD=97=E5=8B=87=E5= =88=9A(Yonggang Luo) wrote:
> > So I am confused. What's the s= ituation about ELF-TLS support in musl?
> > Is that still broken n= ow?
>
> musl has always supported ELF-TLS anywhere except in li= bc itself. That
> was also never the problem. The problem was that th= e mesa people select
> the initial-exec TLS model explicitly, even th= ough libGL ends up being
> dlopen()ed quite often, and then you shoul= d be using the general-dynamic
> model instead.

My= question is does musl support ELS-TLS when using dl-open.



>
> According to [1], Rich proposed dr= opping the initial-exec attribute and
> replacing it with -mtls-diale= ct=3Dgnu2 eight years ago. Has that happened
> yet? If so, dlopen()in= g libGL with musl ought to work.

`initial-exec` are only specified f= or=C2=A0 __GLIBC__, If musl=C2=A0 not predefined macro ` __GLIBC__`
```
#if defined(__GLIBC__)
#define __THREAD_INITIAL_EXE= C thread_local __attribute__((tls_model("initial-exec")))
#def= ine REALLY_INITIAL_EXEC
#else
#define __THREAD_INITIAL_EXEC thread_lo= cal
#endif
```


>
> Ciao,
> Markus
><= br>> [1] https://gitlab.freedesktop.org/mesa/mesa/-/issues/966


--
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=E6=AD=A4=E8=87=B4
=E7=A4=BC=E7=BD=97=E5=8B=87=E5=88=9A
Yours
=C2=A0 =C2=A0 sincerely,
Yongga= ng Luo
--0000000000000e09cf05e23eeb4e--