- T.image = (void *)(base + tls_phdr->p_vaddr);
- T.len = tls_phdr->p_filesz;
- T.size = tls_phdr->p_memsz;
- T.align = tls_phdr->p_align;
+ main_tls.image = (void *)(base + tls_phdr->p_vaddr);
+ main_tls.len = tls_phdr->p_filesz;
+ main_tls.size = tls_phdr->p_memsz;
+ main_tls.align = tls_phdr->p_align;
+ libc.tls_cnt = 1;
+ libc.tls_head = &main_tls;