From: Paolo 'Blaisorblade' Giarrusso Since arch/um/kernel/tt/unmap_fin.o is linked statically, it could contain some symbols also contained in the rest of vmlinux; on some systems, this actually happens (due to some glibc differences). Since that file *must* be linked statically and then relinked (its code must remap the whole .text area except the section it is contained in during UML startup), we cannot change this. So, we use objcopy to turn all symbols into local ones except for switcheroo(), which is the only function actually defined in the source (the other ones are brought in during linking). This shouldn't hurt other systems, while improving the behaviour on affected ones (there is still another issue I'm trying to fix). And it is logically always needed (i.e., without this UML has just happened to work until now). Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton --- 25-akpm/arch/um/kernel/tt/Makefile | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff -puN arch/um/kernel/tt/Makefile~uml-fix-symbol-conflict-in-linking arch/um/kernel/tt/Makefile --- 25/arch/um/kernel/tt/Makefile~uml-fix-symbol-conflict-in-linking 2004-11-03 19:27:50.110172592 -0800 +++ 25-akpm/arch/um/kernel/tt/Makefile 2004-11-03 19:27:50.113172136 -0800 @@ -4,6 +4,7 @@ # extra-y := unmap_fin.o +clean-files := unmap_tmp.o obj-y = exec_kern.o exec_user.o gdb.o ksyms.o mem.o mem_user.o process_kern.o \ syscall_kern.o syscall_user.o time.o tlb.o tracer.o trap_user.o \ @@ -20,10 +21,9 @@ UNMAP_CFLAGS := $(patsubst -fprofile-arc $(USER_OBJS) : %.o: %.c $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< -$(O_TARGET) : $(obj)/unmap_fin.o - $(obj)/unmap.o: $(src)/unmap.c $(CC) $(UNMAP_CFLAGS) -c -o $@ $< -$(obj)/unmap_fin.o : $(src)/unmap.o - ld -r -o $@ $< -lc -L/usr/lib +$(obj)/unmap_fin.o : $(obj)/unmap.o + ld -r -o $(obj)/unmap_tmp.o $< -lc -L/usr/lib + objcopy $(obj)/unmap_tmp.o $@ -G switcheroo _