diff options
author | Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> | 2005-06-21 20:16:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-21 22:07:32 -0400 |
commit | 60b2737de1b1ddfdb90f3ba622634eb49d6f3603 (patch) | |
tree | a352eda5ca213cdae0a2eabd6693b8a4f573e38f /arch/um/kernel/tt | |
parent | b77d6adc922b8bbf8b16b67f567958c42962cf88 (diff) |
[PATCH] uml: fix linkage of tt mode against NPTL
With Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
To make sure switcheroo() can execute when we remap all the executable
image, we used a trick to make it use a local copy of errno... this trick
does not work with NPTL glibc, only with LinuxThreads, so use another
(simpler) one to make it work anyway.
Hopefully, a lot improved thanks to merging with the version of Al Viro
(which had his part of problems, though, i.e. removing a fix to another
bug and not fixing the problem on i386).
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/kernel/tt')
-rw-r--r-- | arch/um/kernel/tt/Makefile | 15 | ||||
-rw-r--r-- | arch/um/kernel/tt/unmap.c | 31 |
2 files changed, 0 insertions, 46 deletions
diff --git a/arch/um/kernel/tt/Makefile b/arch/um/kernel/tt/Makefile index c3faea21a996..3fd2554e60b6 100644 --- a/arch/um/kernel/tt/Makefile +++ b/arch/um/kernel/tt/Makefile | |||
@@ -3,10 +3,6 @@ | |||
3 | # Licensed under the GPL | 3 | # Licensed under the GPL |
4 | # | 4 | # |
5 | 5 | ||
6 | extra-y := unmap_fin.o | ||
7 | targets := unmap.o | ||
8 | clean-files := unmap_tmp.o | ||
9 | |||
10 | obj-y = exec_kern.o exec_user.o gdb.o ksyms.o mem.o mem_user.o process_kern.o \ | 6 | obj-y = exec_kern.o exec_user.o gdb.o ksyms.o mem.o mem_user.o process_kern.o \ |
11 | syscall_kern.o syscall_user.o time.o tlb.o tracer.o trap_user.o \ | 7 | syscall_kern.o syscall_user.o time.o tlb.o tracer.o trap_user.o \ |
12 | uaccess.o uaccess_user.o | 8 | uaccess.o uaccess_user.o |
@@ -16,14 +12,3 @@ obj-$(CONFIG_PT_PROXY) += gdb_kern.o ptproxy/ | |||
16 | USER_OBJS := gdb.o time.o tracer.o | 12 | USER_OBJS := gdb.o time.o tracer.o |
17 | 13 | ||
18 | include arch/um/scripts/Makefile.rules | 14 | include arch/um/scripts/Makefile.rules |
19 | |||
20 | UNMAP_CFLAGS := $(patsubst -pg -DPROFILING,,$(USER_CFLAGS)) | ||
21 | UNMAP_CFLAGS := $(patsubst -fprofile-arcs -ftest-coverage,,$(UNMAP_CFLAGS)) | ||
22 | |||
23 | #XXX: partially copied from arch/um/scripts/Makefile.rules | ||
24 | $(obj)/unmap.o: c_flags = -Wp,-MD,$(depfile) $(UNMAP_CFLAGS) | ||
25 | |||
26 | $(obj)/unmap_fin.o : $(obj)/unmap.o | ||
27 | $(LD) -r -o $(obj)/unmap_tmp.o $< $(shell $(CC) -print-file-name=libc.a) | ||
28 | $(OBJCOPY) $(obj)/unmap_tmp.o $@ -G switcheroo | ||
29 | |||
diff --git a/arch/um/kernel/tt/unmap.c b/arch/um/kernel/tt/unmap.c deleted file mode 100644 index 3f7aecdbe532..000000000000 --- a/arch/um/kernel/tt/unmap.c +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include <sys/mman.h> | ||
7 | |||
8 | int switcheroo(int fd, int prot, void *from, void *to, int size) | ||
9 | { | ||
10 | if(munmap(to, size) < 0){ | ||
11 | return(-1); | ||
12 | } | ||
13 | if(mmap(to, size, prot, MAP_SHARED | MAP_FIXED, fd, 0) != to){ | ||
14 | return(-1); | ||
15 | } | ||
16 | if(munmap(from, size) < 0){ | ||
17 | return(-1); | ||
18 | } | ||
19 | return(0); | ||
20 | } | ||
21 | |||
22 | /* | ||
23 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
24 | * Emacs will notice this stuff at the end of the file and automatically | ||
25 | * adjust the settings for this buffer only. This must remain at the end | ||
26 | * of the file. | ||
27 | * --------------------------------------------------------------------------- | ||
28 | * Local variables: | ||
29 | * c-file-style: "linux" | ||
30 | * End: | ||
31 | */ | ||