diff options
author | Peter Wemm <peter@FreeBSD.org> | 2005-06-29 23:15:36 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 2005-06-29 23:15:36 +0000 |
commit | 3b4399f6a7c6213ad6abffb909614c2fd67be41e (patch) | |
tree | 6ecd7b890dad6bb1f8d329ad34bc2693e44ec484 /libexec/rtld-elf/i386 | |
parent | e55a0cd805e090e95a80e45f1822cb9a81981d3c (diff) | |
download | src-3b4399f6a7c6213ad6abffb909614c2fd67be41e.tar.gz src-3b4399f6a7c6213ad6abffb909614c2fd67be41e.zip |
Clean out the leftovers from the i386_set_gsbase() TLS conversion.
Like on libthr, there is an i386_set_gsbase() stub implementation here
to avoid libc.so.5 issues. This should likely be a weak symbol and I
expect this will be fixed soon.
Approved by: re
Notes
Notes:
svn path=/head/; revision=147673
Diffstat (limited to 'libexec/rtld-elf/i386')
-rw-r--r-- | libexec/rtld-elf/i386/reloc.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/libexec/rtld-elf/i386/reloc.c b/libexec/rtld-elf/i386/reloc.c index 3a73070e27f5..db2fcf2cf441 100644 --- a/libexec/rtld-elf/i386/reloc.c +++ b/libexec/rtld-elf/i386/reloc.c @@ -327,8 +327,6 @@ void allocate_initial_tls(Obj_Entry *objs) { void* tls; - union descriptor ldt; - int error, sel; /* * Fix the size of the static TLS block by using the maximum @@ -337,21 +335,7 @@ allocate_initial_tls(Obj_Entry *objs) */ tls_static_space = tls_last_offset + RTLD_STATIC_TLS_EXTRA; tls = allocate_tls(objs, NULL, 2*sizeof(Elf_Addr), sizeof(Elf_Addr)); - error = i386_set_gsbase(tls); - if (error < 0) { - memset(&ldt, 0, sizeof(ldt)); - ldt.sd.sd_lolimit = 0xffff; /* 4G limit */ - ldt.sd.sd_lobase = ((Elf_Addr)tls) & 0xffffff; - ldt.sd.sd_type = SDT_MEMRWA; - ldt.sd.sd_dpl = SEL_UPL; - ldt.sd.sd_p = 1; /* present */ - ldt.sd.sd_hilimit = 0xf; /* 4G limit */ - ldt.sd.sd_def32 = 1; /* 32 bit */ - ldt.sd.sd_gran = 1; /* limit in pages */ - ldt.sd.sd_hibase = (((Elf_Addr)tls) >> 24) & 0xff; - sel = i386_set_ldt(LDT_AUTO_ALLOC, &ldt, 1); - __asm __volatile("movl %0,%%gs" : : "rm" ((sel << 3) | 7)); - } + i386_set_gsbase(tls); } /* GNU ABI */ |