public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "chris dot steel dot lnx at googlemail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/36706] New: [Regression] linux-kernel 2.6.24 doesn't boot for arm Date: Wed, 02 Jul 2008 22:34:00 -0000 [thread overview] Message-ID: <bug-36706-16407@http.gcc.gnu.org/bugzilla/> (raw) I've built linux-2.6.24 for arm using gcc-4.3.1 and while it builds fine, the resulting binary doesn't boot on qemu. If I build the same kernel with gcc-4.2.4 it boots correctly. The problem seems to be that the prefetch function (linux-2.6.24/include/asm-arm/processor.h) causes a crash if it is called with a NULL pointer argument. But only if it's compiled with gcc-4.3.x. This patch fixes the problem, but the extra code may cost more than you gain by having prefetch in the first place diff -urN linux-2.6.24-clean/include/asm-arm/processor.h linux-2.6.24/include/asm-arm/processor.h --- linux-2.6.24-clean/include/asm-arm/processor.h 2008-01-24 22:58:37.000000000 +0000 +++ linux-2.6.24/include/asm-arm/processor.h 2008-07-02 22:44:26.052525328 +0100 @@ -105,11 +105,14 @@ #define ARCH_HAS_PREFETCH static inline void prefetch(const void *ptr) { - __asm__ __volatile__( - "pld\t%0" - : - : "o" (*(char *)ptr) - : "cc"); + if (ptr) + { + __asm__ __volatile__( + "pld\t%0" + : + : "o" (*(char *)ptr) + : "cc"); + } } #define ARCH_HAS_PREFETCHW -- Summary: [Regression] linux-kernel 2.6.24 doesn't boot for arm Product: gcc Version: 4.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: chris dot steel dot lnx at googlemail dot com GCC build triplet: x86_64-cross-linux-gnu GCC host triplet: x86_64-cross-linux-gnu GCC target triplet: arm-unknown-linux-gnueabi http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36706
next reply other threads:[~2008-07-02 22:34 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-07-02 22:34 chris dot steel dot lnx at googlemail dot com [this message] 2008-07-02 22:37 ` [Bug c/36706] " chris dot steel dot lnx at googlemail dot com 2008-07-02 22:44 ` pinskia at gcc dot gnu dot org 2008-07-02 22:47 ` [Bug inline-asm/36706] " pinskia at gcc dot gnu dot org 2008-07-02 22:48 ` pinskia at gcc dot gnu dot org
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=bug-36706-16407@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).