[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>
This commit is contained in:

committed by
Linus Torvalds

parent
b77d6adc92
commit
60b2737de1
@@ -10,6 +10,12 @@ USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
|
||||
$(USER_OBJS) : c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) \
|
||||
$(CFLAGS_$(notdir $@))
|
||||
|
||||
# The stubs and unmap.o can't try to call mcount or update basic block data
|
||||
define unprofile
|
||||
$(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1)))
|
||||
endef
|
||||
|
||||
|
||||
quiet_cmd_make_link = SYMLINK $@
|
||||
cmd_make_link = ln -sf $(srctree)/arch/$(SUBARCH)/$($(notdir $@)-dir)/$(notdir $@) $@
|
||||
|
||||
|
22
arch/um/scripts/Makefile.unmap
Normal file
22
arch/um/scripts/Makefile.unmap
Normal file
@@ -0,0 +1,22 @@
|
||||
clean-files += unmap_tmp.o unmap_fin.o unmap.o
|
||||
|
||||
ifdef CONFIG_MODE_TT
|
||||
|
||||
#Always build unmap_fin.o
|
||||
extra-y += unmap_fin.o
|
||||
#Do dependency tracking for unmap.o (it will be always built, but won't get the tracking unless we use this).
|
||||
targets += unmap.o
|
||||
|
||||
#XXX: partially copied from arch/um/scripts/Makefile.rules
|
||||
$(obj)/unmap.o: _c_flags = $(call unprofile,$(CFLAGS))
|
||||
|
||||
quiet_cmd_wrapld = LD $@
|
||||
define cmd_wrapld
|
||||
$(LD) -r -o $(obj)/unmap_tmp.o $< $(shell $(CC) -print-file-name=libc.a); \
|
||||
$(OBJCOPY) $(obj)/unmap_tmp.o $@ -G switcheroo
|
||||
endef
|
||||
|
||||
$(obj)/unmap_fin.o : $(obj)/unmap.o FORCE
|
||||
$(call if_changed,wrapld)
|
||||
|
||||
endif
|
Reference in New Issue
Block a user