Skip to content

Commit 905a770

Browse files
sulixrichardweinberger
authored andcommitted
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: David Gow <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent d5dbcfe commit 905a770

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/um/Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ KBUILD_CFLAGS += $(CFLAGS) $(CFLAGS-y) -D__arch_um__ \
6868
-Din6addr_loopback=kernel_in6addr_loopback \
6969
-Din6addr_any=kernel_in6addr_any -Dstrrchr=kernel_strrchr
7070

71+
KBUILD_RUSTFLAGS += -Crelocation-model=pie
72+
7173
KBUILD_AFLAGS += $(ARCH_INCLUDE)
7274

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

0 commit comments

Comments
 (0)