From: "H. Peter Anvin" <hpa@zytor.com>
To: Jean Delvare <khali@linux-fr.org>
Cc: Sam Ravnborg <sam@ravnborg.org>,
linux-kbuild@vger.kernel.org,
the arch/x86 maintainers <x86@kernel.org>
Subject: Re: ld:arch/x86/kernel/vmlinux.lds:678: parse error
Date: Mon, 03 Aug 2009 08:31:37 -0700 [thread overview]
Message-ID: <4A7702D9.5080101@zytor.com> (raw)
In-Reply-To: <20090803140459.02cea700@hyperion.delvare>
[-- Attachment #1: Type: text/plain, Size: 954 bytes --]
On 08/03/2009 05:04 AM, Jean Delvare wrote:
> Hi Sam,
>
> I am not able to build Linus' latest kernel on my oldest test system. I
> get the following linking error at the end:
>
> LD .tmp_vmlinux1
> ld:arch/x86/kernel/vmlinux.lds:678: parse error
>
> Which is:
>
> ASSERT((_end - 0xC0000000 <= (512 * 1024 * 1024)),
> "kernel image bigger than KERNEL_IMAGE_SIZE")
>
> Apparently this assertion is relatively new, as I was able to build
> kernel 2.6.29 on the same system. The system has binutils 2.14.90.0.6,
> which is more recent than what is listed in Documentation/Changes
> (2.12).
>
> Any idea?
>
Old binutils doesn't accept the naked ASSERT(); there has to be a sink
for the data; so one has to do crap like:
__junk_symbol = ASSERT(...);
or
. = ASSERT(...);
near the end.
Does this patch fix it for you?
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 1089 bytes --]
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index 59f31d2..2eb6874 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -407,12 +407,12 @@ INIT_PER_CPU(irq_stack_union);
/*
* Build-time check on the image size:
*/
-ASSERT((_end - _text <= KERNEL_IMAGE_SIZE),
- "kernel image bigger than KERNEL_IMAGE_SIZE")
+. = ASSERT((_end - _text <= KERNEL_IMAGE_SIZE),
+ "kernel image bigger than KERNEL_IMAGE_SIZE");
#ifdef CONFIG_SMP
-ASSERT((per_cpu__irq_stack_union == 0),
- "irq_stack_union is not at start of per-cpu area");
+. = ASSERT((per_cpu__irq_stack_union == 0),
+ "irq_stack_union is not at start of per-cpu area");
#endif
#endif /* CONFIG_X86_32 */
@@ -420,7 +420,6 @@ ASSERT((per_cpu__irq_stack_union == 0),
#ifdef CONFIG_KEXEC
#include <asm/kexec.h>
-ASSERT(kexec_control_code_size <= KEXEC_CONTROL_CODE_MAX_SIZE,
- "kexec control code size is too big")
+. = ASSERT(kexec_control_code_size <= KEXEC_CONTROL_CODE_MAX_SIZE,
+ "kexec control code size is too big");
#endif
-
next prev parent reply other threads:[~2009-08-03 15:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-03 12:04 ld:arch/x86/kernel/vmlinux.lds:678: parse error Jean Delvare
2009-08-03 15:31 ` H. Peter Anvin [this message]
2009-08-03 19:32 ` Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A7702D9.5080101@zytor.com \
--to=hpa@zytor.com \
--cc=khali@linux-fr.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox