From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id 33A4467A79 for ; Tue, 22 Feb 2005 01:29:11 +1100 (EST) Message-ID: <4219F010.2040507@netwinder.org> Date: Mon, 21 Feb 2005 09:28:32 -0500 From: Ralph Siemsen MIME-Version: 1.0 To: Wojciech Kromer References: <4219EC67.1070602@dgt-lab.com.pl> In-Reply-To: <4219EC67.1070602@dgt-lab.com.pl> Content-Type: text/plain; charset=us-ascii; format=flowed Cc: linuxppc-embedded@ozlabs.org Subject: Re: any hints using gcc 3.4.3 for 2.4.25 kernel? List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 and , 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 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