Commit 905a7707 authored by David Gow's avatar David Gow Committed by Richard Weinberger
Browse files

rust: arch/um: Use 'pie' relocation mode under UML



UML expects a position independent executable for some reason, so tell
rustc to generate pie objects. Otherwise we get a bunch of relocations
we can't deal with in libcore.

Signed-off-by: default avatarDavid Gow <davidgow@google.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent d5dbcfe7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -68,6 +68,8 @@ KBUILD_CFLAGS += $(CFLAGS) $(CFLAGS-y) -D__arch_um__ \
	-Din6addr_loopback=kernel_in6addr_loopback \
	-Din6addr_any=kernel_in6addr_any -Dstrrchr=kernel_strrchr

KBUILD_RUSTFLAGS += -Crelocation-model=pie

KBUILD_AFLAGS += $(ARCH_INCLUDE)

USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -I%,,$(KBUILD_CFLAGS))) \