TLS stuff
Jakub Jelinek
jakub@redhat.com
Tue Feb 5 02:55:00 GMT 2002
On Mon, Feb 04, 2002 at 05:00:41PM -0800, Ulrich Drepper wrote:
> I've checked i a first batch of thread-local storage related changes.
> Nothing works yet, it's just the beginning. But it is time to get the
> ABIs hammered out for anything but ia64, x86, and sparc.
>
> Those who are watching the todo list might have seen a new item for
> the tls integration. The description of it contains a reference of
> the TLS document I wrote. It's reasonable complete and usable though
> there will be changes. Give it a read and create the ABIs for your
> platform. It's really time now.
+#if USE_TLS
+ /* Get the dynamic linkers program header. */
+ ehdr = (ElfW(Ehdr) *) bootstrap_map_p->l_addr;
+ phdr = (ElfW(Phdr) *) (bootstrap_map_p->l_addr + ehdr->e_phoff);
The above 2 will not work with prelink. bootstrap_map_p->l_addr == 0 in that
case. You should use GL(dl_rtld_map).l_map_start instead of
bootstrap_map_p->l_addr (or, if you prefer, (ElfW(Addr)) _begin).
+ for (cnt = 0; cnt < ehdr->e_phnum; ++cnt)
Jakub
More information about the Libc-hacker
mailing list