diff --git a/libexec/rtld-elf/amd64/reloc.c b/libexec/rtld-elf/amd64/reloc.c index 3b009871765..5f408471f10 100644 --- a/libexec/rtld-elf/amd64/reloc.c +++ b/libexec/rtld-elf/amd64/reloc.c @@ -487,10 +487,8 @@ allocate_initial_tls(Obj_Entry *objs) void *__tls_get_addr(tls_index *ti) { Elf_Addr** segbase; - Elf_Addr* dtv; __asm __volatile("movq %%fs:0, %0" : "=r" (segbase)); - dtv = segbase[1]; return tls_get_addr_common(&segbase[1], ti->ti_module, ti->ti_offset); } diff --git a/libexec/rtld-elf/i386/reloc.c b/libexec/rtld-elf/i386/reloc.c index 68a5331064b..a2c8c987f32 100644 --- a/libexec/rtld-elf/i386/reloc.c +++ b/libexec/rtld-elf/i386/reloc.c @@ -444,10 +444,8 @@ __attribute__((__regparm__(1))) void *___tls_get_addr(tls_index *ti) { Elf_Addr** segbase; - Elf_Addr* dtv; __asm __volatile("movl %%gs:0, %0" : "=r" (segbase)); - dtv = segbase[1]; return tls_get_addr_common(&segbase[1], ti->ti_module, ti->ti_offset); } @@ -456,10 +454,8 @@ void *___tls_get_addr(tls_index *ti) void *__tls_get_addr(tls_index *ti) { Elf_Addr** segbase; - Elf_Addr* dtv; __asm __volatile("movl %%gs:0, %0" : "=r" (segbase)); - dtv = segbase[1]; return tls_get_addr_common(&segbase[1], ti->ti_module, ti->ti_offset); }