diff options
author | Roland McGrath <roland@gnu.org> | 2002-09-18 01:18:08 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2002-09-18 01:18:08 +0000 |
commit | 1d0ad7736265961192d5f7db11d55b49392c0936 (patch) | |
tree | 2f0beed71291665ad25cc03c572964b4d7753afc /linuxthreads | |
parent | c843e065a1658d1a6d55a0f0b3befd200c3ec595 (diff) | |
download | glibc-1d0ad7736265961192d5f7db11d55b49392c0936.tar glibc-1d0ad7736265961192d5f7db11d55b49392c0936.tar.gz glibc-1d0ad7736265961192d5f7db11d55b49392c0936.tar.bz2 glibc-1d0ad7736265961192d5f7db11d55b49392c0936.zip |
* elf/dl-lookup.c (_dl_debug_bindings): Print TLS lookups always.
* elf/elf.h (R_386_TLS_TPOFF, R_386_TLS_IE, R_386_TLS_GOTIE,
R_386_TLS_LE): Define.
(R_386_TLS_IE_32, R_386_TLS_LE_32, R_386_TLS_TPOFF32): Update
comments.
* sysdeps/i386/dl-machine.h (elf_machine_type_class): Return
ELF_RTYPE_CLASS_PLT for R_386_TLS_TPOFF.
(elf_machine_rel): Handle R_386_TLS_TPOFF.
(elf_machine_rela): Likewise.
Remove unnecessary RTLD_BOOTSTRAP #ifdefs.
Diffstat (limited to 'linuxthreads')
-rw-r--r-- | linuxthreads/ChangeLog | 7 | ||||
-rw-r--r-- | linuxthreads/sysdeps/i386/tls.h | 8 | ||||
-rw-r--r-- | linuxthreads/sysdeps/i386/useldt.h | 26 |
3 files changed, 24 insertions, 17 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index fd23cfff66..40913b630b 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,10 @@ +2002-09-17 Roland McGrath <roland@redhat.com> + + * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA): + Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any + offset (positive or negative) relative to the thread struct. + * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise. + 2002-09-12 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move... diff --git a/linuxthreads/sysdeps/i386/tls.h b/linuxthreads/sysdeps/i386/tls.h index a0c822759f..7715303d95 100644 --- a/linuxthreads/sysdeps/i386/tls.h +++ b/linuxthreads/sysdeps/i386/tls.h @@ -99,8 +99,8 @@ typedef struct # define TLS_DO_MODIFY_LDT(descr, nr) \ ({ \ struct modify_ldt_ldt_s ldt_entry = \ - { nr, (unsigned long int) (descr), sizeof (struct _pthread_descr_struct), \ - 1, 0, 0, 0, 0, 1, 0 }; \ + { nr, (unsigned long int) (descr), 0xfffff /* 4GB in pages */, \ + 1, 0, 0, 1, 0, 1, 0 }; \ int result; \ asm volatile (TLS_LOAD_EBX \ "int $0x80\n\t" \ @@ -118,8 +118,8 @@ typedef struct # define TLS_DO_SET_THREAD_AREA(descr, secondcall) \ ({ \ struct modify_ldt_ldt_s ldt_entry = \ - { -1, (unsigned long int) (descr), sizeof (struct _pthread_descr_struct), \ - 1, 0, 0, 0, 0, 1, 0 }; \ + { -1, (unsigned long int) (descr), 0xfffff /* 4GB in pages */, \ + 1, 0, 0, 1, 0, 1, 0 }; \ int result; \ if (secondcall) \ ldt_entry.entry_number = ({ int _gs; \ diff --git a/linuxthreads/sysdeps/i386/useldt.h b/linuxthreads/sysdeps/i386/useldt.h index 2b30cafa9e..31893b4013 100644 --- a/linuxthreads/sysdeps/i386/useldt.h +++ b/linuxthreads/sysdeps/i386/useldt.h @@ -11,22 +11,22 @@ The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + Boston, MA 02111-1307, USA. */ #ifndef __ASSEMBLER__ #include <stddef.h> /* For offsetof. */ -#include <stdlib.h> /* For abort(). */ -#include <sysdep.h> /* For INLINE_SYSCALL. */ +#include <stdlib.h> /* For abort(). */ +#include <sysdep.h> /* For INLINE_SYSCALL. */ -/* We don't want to include the kernel header. So duplicate the - information. */ +/* We don't want to include the kernel header. So duplicate the + information. */ /* Structure passed on `modify_ldt' call. */ struct modify_ldt_ldt_s @@ -63,13 +63,13 @@ extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t); }) -/* Initialize the thread-unique value. Two possible ways to do it. */ +/* Initialize the thread-unique value. Two possible ways to do it. */ #define DO_MODIFY_LDT(descr, nr) \ ({ \ struct modify_ldt_ldt_s ldt_entry = \ - { nr, (unsigned long int) descr, sizeof (struct _pthread_descr_struct), \ - 1, 0, 0, 0, 0, 1, 0 }; \ + { nr, (unsigned long int) (descr), 0xfffff /* 4GB in pages */, \ + 1, 0, 0, 1, 0, 1, 0 }; \ if (__modify_ldt (1, &ldt_entry, sizeof (ldt_entry)) != 0) \ abort (); \ asm ("movw %w0, %%gs" : : "q" (nr * 8 + 7)); \ @@ -93,8 +93,8 @@ extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t); asm ("movw %%gs, %w0" : "=q" (__gs)); \ struct modify_ldt_ldt_s ldt_entry = \ { (__gs & 0xffff) >> 3, \ - (unsigned long int) descr, sizeof (struct _pthread_descr_struct), \ - 1, 0, 0, 0, 0, 1, 0 }; \ + (unsigned long int) (descr), 0xfffff /* 4GB in pages */, \ + 1, 0, 0, 1, 0, 1, 0 }; \ if (__builtin_expect (INLINE_SYSCALL (set_thread_area, 1, &ldt_entry), \ 0) == 0) \ asm ("movw %w0, %%gs" :: "q" (__gs)); \ @@ -105,8 +105,8 @@ extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t); { \ struct modify_ldt_ldt_s ldt_entry = \ { -1, \ - (unsigned long int) descr, sizeof (struct _pthread_descr_struct), \ - 1, 0, 0, 0, 0, 1, 0 }; \ + (unsigned long int) (descr), 0xfffff /* 4GB in pages */, \ + 1, 0, 0, 1, 0, 1, 0 }; \ if (__builtin_expect (INLINE_SYSCALL (set_thread_area, 1, &ldt_entry), \ 0) == 0) \ { \ |