-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hermiticity issues with ARCH=um #1715
Comments
This is because UML links the final kernel and vDSO with https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/link-vmlinux.sh#n78 We should be able to stick |
That shouldn't be a problem; you can pass |
I tried this with So it looks like the hermeticity issues with $(LD) are only part of the issue here, and lld is presumably a bit stricter with what it accepts than ld. Details below: Patch
Errors (CONFIG_STATIC_LINK=n)
Errors (CONFIG_STATIC_LINK=y)
|
With the diff --git a/arch/um/Makefile b/arch/um/Makefile
index 34957dcb88b9..dd42248dead8 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -120,6 +120,9 @@ LINK-$(call gcc-min-version, 60100)$(CONFIG_CC_IS_CLANG) += -no-pie
endif
LINK-$(CONFIG_LD_SCRIPT_DYN_RPATH) += -Wl,-rpath,/lib
+# Since we're using CC as the driver, we need to force LLD if it is requested.
+LINK-$(CONFIG_LD_IS_LLD) += $(call cc-option,--ld-path=$(LD),-fuse-ld=lld) -Wl,-z,norelro
+
CFLAGS_NO_HARDENING := $(call cc-option, -fno-PIC,) $(call cc-option, -fno-pic,) \
-fno-stack-protector $(call cc-option, -fno-stack-protector-all)
Unfortunately, that kernel does not boot for me, at least with
|
via https://lore.kernel.org/lkml/[email protected]/ there's a comment:
I checked our CI and sure enough I can see warnings from /usr/bin/ld.
https://github.com/ClangBuiltLinux/continuous-integration2/actions/runs/3095779516/jobs/5012260390
That's unexpected for LLVM=1 builds.
The text was updated successfully, but these errors were encountered: