Skip to content

Commit

Permalink
* sysdeps/mach/hurd/i386/tls.h (_hurd_tls_init): Make sure high bits
Browse files Browse the repository at this point in the history
	of SEL are clear after copying %gs to low bits.
	(_hurd_tls_fork): Likewise.
  • Loading branch information
Roland McGrath committed Mar 5, 2006
1 parent 3295976 commit a935c3d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 38 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2006-03-04 Roland McGrath <roland@frob.com>

* sysdeps/mach/hurd/i386/tls.h (_hurd_tls_init): Make sure high bits
of SEL are clear after copying %gs to low bits.
(_hurd_tls_fork): Likewise.

2006-03-03 Roland McGrath <roland@redhat.com>

[BZ #2414]
Expand Down
4 changes: 2 additions & 2 deletions sysdeps/mach/hurd/i386/tls.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ _hurd_tls_init (tcbhead_t *tcb, int secondcall)
{
/* Fetch the selector set by the first call. */
int sel;
asm ("mov %%gs, %w0" : "=q" (sel));
asm ("mov %%gs, %w0" : "=q" (sel) : "0" (0));
if (__builtin_expect (sel, 0x50) & 4) /* LDT selector */
{
error_t err = __i386_set_ldt (tcb->self, sel, &desc, 1);
Expand Down Expand Up @@ -151,7 +151,7 @@ _hurd_tls_fork (thread_t child, struct i386_thread_state *state)
{
/* Fetch the selector set by _hurd_tls_init. */
int sel;
asm ("mov %%gs, %w0" : "=q" (sel));
asm ("mov %%gs, %w0" : "=q" (sel) : "0" (0));
if (sel == state->ds) /* _hurd_tls_init was never called. */
return 0;

Expand Down
23 changes: 5 additions & 18 deletions sysdeps/unix/sysv/linux/configure
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ case "$machine" in
arch_minimum_kernel=2.0.10
libc_cv_gcc_unwind_find_fde=yes
;;
mips*)
arch_minimum_kernel=2.4.0
libc_cv_gcc_unwind_find_fde=yes
;;
powerpc/powerpc32)
libc_cv_gcc_unwind_find_fde=yes
arch_minimum_kernel=2.0.10
Expand Down Expand Up @@ -228,25 +224,19 @@ fi
# in /lib and /etc.
case "$prefix" in
/usr | /usr/)
# 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
# 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
# Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
# and libc_cv_localedir.
test -n "$libc_cv_slibdir" || \
case $machine in
sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
mips/mips64/n64/* )
sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64)
libc_cv_slibdir="/lib64"
if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64';
# Locale data can be shared between 32bit and 64bit libraries
libc_cv_localedir='${exec_prefix}/lib/locale'
fi
;;
mips/mips64/n32/* )
libc_cv_slibdir="/lib32"
if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib32';
# Locale data can be shared between 32bit and 64bit libraries
libc_cv_localedir='${exec_prefix}/lib/locale'
fi
;;
*)
libc_cv_slibdir="/lib"
;;
Expand Down Expand Up @@ -317,9 +307,6 @@ case "$machine" in
ia64*)
ldd_rewrite_script=../sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
;;
mips/*64*)
ldd_rewrite_script=../sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed
;;
s390*)
ldd_rewrite_script=../sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed
;;
Expand Down
23 changes: 5 additions & 18 deletions sysdeps/unix/sysv/linux/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ case "$machine" in
arch_minimum_kernel=2.0.10
libc_cv_gcc_unwind_find_fde=yes
;;
mips*)
arch_minimum_kernel=2.4.0
libc_cv_gcc_unwind_find_fde=yes
;;
powerpc/powerpc32)
libc_cv_gcc_unwind_find_fde=yes
arch_minimum_kernel=2.0.10
Expand Down Expand Up @@ -163,25 +159,19 @@ fi
# in /lib and /etc.
case "$prefix" in
/usr | /usr/)
# 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
# 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
# Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
# and libc_cv_localedir.
test -n "$libc_cv_slibdir" || \
case $machine in
sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
mips/mips64/n64/* )
sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64)
libc_cv_slibdir="/lib64"
if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64';
# Locale data can be shared between 32bit and 64bit libraries
libc_cv_localedir='${exec_prefix}/lib/locale'
fi
;;
mips/mips64/n32/* )
libc_cv_slibdir="/lib32"
if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib32';
# Locale data can be shared between 32bit and 64bit libraries
libc_cv_localedir='${exec_prefix}/lib/locale'
fi
;;
*)
libc_cv_slibdir="/lib"
;;
Expand Down Expand Up @@ -252,9 +242,6 @@ case "$machine" in
ia64*)
ldd_rewrite_script=../sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
;;
mips/*64*)
ldd_rewrite_script=../sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed
;;
s390*)
ldd_rewrite_script=../sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed
;;
Expand Down

0 comments on commit a935c3d

Please sign in to comment.