* [PATCH 1/2] um: link vmlinux with -no-pie
@ 2017-08-20 11:26 Thomas Meyer
2017-08-20 11:26 ` [PATCH 2/2] um: Use relative modversions with LD_SCRIPT_DYN Thomas Meyer
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Meyer @ 2017-08-20 11:26 UTC (permalink / raw)
To: linux-kernel, user-mode-linux-devel; +Cc: Thomas Meyer
Debian's gcc defaults to pie. The global Makefile already defines the -fno-pie option.
Link UML dynamic kernel image also with -no-pie to fix the build.
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---
arch/um/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/um/Makefile b/arch/um/Makefile
index f1c9269b2c2a..8e3ae6d0c810 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -121,7 +121,7 @@ archheaders:
archprepare: include/generated/user_constants.h
LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static
-LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib
+LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib $(call cc-option, -no-pie)
CFLAGS_NO_HARDENING := $(call cc-option, -fno-PIC,) $(call cc-option, -fno-pic,) \
$(call cc-option, -fno-stack-protector,) \
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] um: Use relative modversions with LD_SCRIPT_DYN
2017-08-20 11:26 [PATCH 1/2] um: link vmlinux with -no-pie Thomas Meyer
@ 2017-08-20 11:26 ` Thomas Meyer
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Meyer @ 2017-08-20 11:26 UTC (permalink / raw)
To: linux-kernel, user-mode-linux-devel; +Cc: Thomas Meyer
When building a dynamic kernel image use relative symbols with MODVERSIONS.
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---
arch/um/Kconfig.um | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/um/Kconfig.um b/arch/um/Kconfig.um
index 4b2ed5858b2e..e26376ab5452 100644
--- a/arch/um/Kconfig.um
+++ b/arch/um/Kconfig.um
@@ -20,6 +20,7 @@ config LD_SCRIPT_DYN
bool
default y
depends on !LD_SCRIPT_STATIC
+ select MODULE_REL_CRCS if MODVERSIONS
source "fs/Kconfig.binfmt"
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-20 11:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-20 11:26 [PATCH 1/2] um: link vmlinux with -no-pie Thomas Meyer
2017-08-20 11:26 ` [PATCH 2/2] um: Use relative modversions with LD_SCRIPT_DYN Thomas Meyer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.