diff options
author | David Gow <davidgow@google.com> | 2022-12-17 12:44:34 +0800 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2023-02-10 21:27:32 +0100 |
commit | 905a77077573056d7af508f35373f66ed8b4a39e (patch) | |
tree | a2c95f825caf8f081b429e37d88b94770a726972 /arch/um | |
parent | d5dbcfe7ee31ccea85a8cbf7ff84a2808d6c8f76 (diff) | |
download | linux-starfive-905a77077573056d7af508f35373f66ed8b4a39e.tar.gz linux-starfive-905a77077573056d7af508f35373f66ed8b4a39e.tar.bz2 linux-starfive-905a77077573056d7af508f35373f66ed8b4a39e.zip |
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 <davidgow@google.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/Makefile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/um/Makefile b/arch/um/Makefile index f1d4d67157be..ae321282dc6f 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -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))) \ |