|
Message-ID: <tencent_4622DE368F75832FCE2C784BD8F1F90C8E05@qq.com>
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
Q1: What if the size of the tls used by libc is larger than the builtin size?
https://github.com/bminor/musl/blob/master/ldso/dynlink.c#L1785
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 libc.tls_head be modified before this time?
https://github.com/bminor/musl/blob/master/src/env/__init_tls.c#L64
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.