From: Ralph Siemsen <ralphs@netwinder.org>
To: Wojciech Kromer <krom@dgt-lab.com.pl>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: any hints using gcc 3.4.3 for 2.4.25 kernel?
Date: Mon, 21 Feb 2005 09:28:32 -0500 [thread overview]
Message-ID: <4219F010.2040507@netwinder.org> (raw)
In-Reply-To: <4219EC67.1070602@dgt-lab.com.pl>
Wojciech Kromer wrote:
> a)first i have:
> - 2.4.25 kernel (from denx cvs)
> - eldk with 2.95.4 compiler
> this one set works fine :)
>
> b)then, i've tried to same sources with:
> gcc-3.4.3 , self build from uClibc buildroot
> new hernel hangs just after decompressing :(
I haven't tried this on PPC, but under similar circumstances on ARM what
I learned was: there are several places in the kernel where lists are
generated by some linker tricks. For example all of the device
initialization functions are assembled into a list, so they can be
conveniently called in sequence.
The semantics for getting the linker to fill this list have changed. In
2.4 days they used ELF sections marked as "unnused", which were simply
ignored but passed through.
Newer toolchains now drop unnused sections, so the initialization tables
are not present in your kernel, which leads to the crash. I was able
kludge around this by changing in <asm/setup.h> and <linux/init.h>,
search for __attribute__((unused, ...) and change to "used" instead.
There are about half dozen occurrences, in the __init* and __exit*
macros. You then need some ugly casts in <linux/module.h> to match.
Of course the same thing could happen in other places/drivers, so really
the above is not a good solution. New 2.6 kernels handle this sort of
thing in a different way. Best solution is to keep an older gcc for
older kernels, and a newer one for 2.6...
-Ralph
next prev parent reply other threads:[~2005-02-21 14:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-21 14:12 any hints using gcc 3.4.3 for 2.4.25 kernel? Wojciech Kromer
2005-02-21 14:28 ` Ralph Siemsen [this message]
2005-02-23 14:54 ` Gerhard Jaeger
2005-02-23 15:38 ` Bryan O'Donoghue
2005-02-23 15:42 ` Gerhard Jaeger
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=4219F010.2040507@netwinder.org \
--to=ralphs@netwinder.org \
--cc=krom@dgt-lab.com.pl \
--cc=linuxppc-embedded@ozlabs.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;
as well as URLs for NNTP newsgroup(s).