Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sun, 21 Jan 2024 16:56:40 +0800
From: "847567161" <847567161@...com>
To: "musl" <musl@...ts.openwall.com>
Subject: 【Linker】Does MUSL support using TLS for both libc and app dependencies?

1、About builtin_tls
&nbsp; Q1: What if the size of the tls used by libc is larger than the builtin size?
&nbsp; &nbsp; &nbsp; https://github.com/bminor/musl/blob/master/ldso/dynlink.c#L1785


&nbsp; Q2: I haven’t seen any processing of the tls segment of ldso, so how does __copy_tls take effect at this time, where was&nbsp; libc.tls_head be modified before this time?
&nbsp; &nbsp; &nbsp; https://github.com/bminor/musl/blob/master/src/env/__init_tls.c#L64


&nbsp; Q3: Is it possible to init main thread tls by calling malloc according to the tls size of libc at this time?


2、About libc and other so use tls at the same time
	I didn’t see musl modify tls_offset when ldso uses tls, so when another so uses tls later, their tls offsets will conflict.
Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.