diff options
author | peter <peter@FreeBSD.org> | 2005-04-26 20:51:15 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2005-04-26 20:51:15 +0000 |
commit | e4fe1baaf926df48b77a6e8cf7e7d2476dbbc0b0 (patch) | |
tree | bd038eb2769158478e9fabef07ea5576aab266ce | |
parent | de2d951ab7c0752cf69e8f37630bac0d7c5116c6 (diff) | |
download | FreeBSD-src-e4fe1baaf926df48b77a6e8cf7e7d2476dbbc0b0.zip FreeBSD-src-e4fe1baaf926df48b77a6e8cf7e7d2476dbbc0b0.tar.gz |
Provide stub functions for i386_set_ldt() and i386_get_ldt() even when
compiling as an amd64 support binary. They will return EINVAL on an amd64
kernel, but this simplifies other #ifdefs that were getting a bit nasty.
-rw-r--r-- | lib/libc/i386/gen/_set_tp.c | 4 | ||||
-rw-r--r-- | lib/libc/i386/sys/Makefile.inc | 7 |
2 files changed, 4 insertions, 7 deletions
diff --git a/lib/libc/i386/gen/_set_tp.c b/lib/libc/i386/gen/_set_tp.c index a9fdae8..9b76fa2 100644 --- a/lib/libc/i386/gen/_set_tp.c +++ b/lib/libc/i386/gen/_set_tp.c @@ -34,7 +34,6 @@ void _set_tp(void *tp) { -#ifndef COMPAT_32BIT union descriptor ldt; int error, sel; @@ -53,7 +52,4 @@ _set_tp(void *tp) ldt.sd.sd_hibase = (((uintptr_t)tp) >> 24) & 0xff; sel = i386_set_ldt(LDT_AUTO_ALLOC, &ldt, 1); __asm __volatile("movl %0,%%gs" : : "rm" ((sel << 3) | 7)); -#else - i386_set_gsbase(tp); -#endif } diff --git a/lib/libc/i386/sys/Makefile.inc b/lib/libc/i386/sys/Makefile.inc index fbd3b55..ca487a6 100644 --- a/lib/libc/i386/sys/Makefile.inc +++ b/lib/libc/i386/sys/Makefile.inc @@ -2,10 +2,11 @@ # $FreeBSD$ .if !defined(COMPAT_32BIT) -SRCS+= i386_clr_watch.c i386_get_ioperm.c i386_get_ldt.c i386_set_ioperm.c \ - i386_set_ldt.c i386_set_watch.c i386_vm86.c +SRCS+= i386_clr_watch.c i386_get_ioperm.c \ + i386_set_ioperm.c i386_set_watch.c i386_vm86.c .endif -SRCS+= i386_get_fsbase.c i386_get_gsbase.c i386_set_fsbase.c i386_set_gsbase.c +SRCS+= i386_get_fsbase.c i386_get_gsbase.c i386_get_ldt.c \ + i386_set_fsbase.c i386_set_gsbase.c i386_set_ldt.c MDASM= Ovfork.S brk.S cerror.S exect.S getcontext.S pipe.S ptrace.S \ reboot.S sbrk.S setlogin.S sigreturn.S syscall.S |