-
Notifications
You must be signed in to change notification settings - Fork 2
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
ld.lld: error: kernel image bigger than KERNEL_IMAGE_SIZE #5
Comments
I was able to reproduce this! |
@sugamadhiakri Thanks for confirming! Did you also try checking out About this problem, I'm thinking of a few things we could do,
|
|
For (6), I experimented locally with diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index 412ab19aa..9ff93b586 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -495,8 +495,10 @@ SECTIONS
/*
* The ASSERT() sink to . is intentional, for binutils 2.14 compatibility:
*/
+/*
. = ASSERT((_end - LOAD_OFFSET <= KERNEL_IMAGE_SIZE),
"kernel image bigger than KERNEL_IMAGE_SIZE");
+*/
#ifdef CONFIG_X86_64
/* Build can finish but boot fails, which is not too surprising. What's important though, is the
|
For (3), I experimented locally with the same LLVM commit. I can confirm we are be able to revert to 6-condition limit. Several CI runs are queueing to binary-search the threshold. Updates will be posted in this reply. |
For (5), this post claims their solution is probably more generalizable than debuginfo correlation
The idea is to build a binary with
|
According to the CI runs, the threshold seems
This value in some sense matches our earlier analysis of kernel source: the maximum number of decision was exactly 45, mostly contributed by those macros checking CPUID, e.g. By ignoring
Observations:
Implications:
|
Is the size in bytes? (Does that tool have |
Yes, (no), yes.
The encoding of bitmap has not changed. What llvm/llvm-project#82448 does is
Do you want us (university or Boeing) to do this? |
Well, if 82448 reduced the number of bits, then it changes the encoding. :)
I thought the case with 45 conditions has mostly related conditions, like
I don't think this is a high priority now if we can build Linux (while not handling just one macro with 45 conditions that appears in many places). But it could be something to revisit later on. |
After llvm/llvm-project#82448 gets merged LLVM 19 no longer works.
During build:
More information will be posted here.
Note: if we follow the current documentation we will checkout a snapshot earlier this week (2024-06-11) and should not be affected.
The text was updated successfully, but these errors were encountered: