From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albin Tonnerre Subject: Re: [PATCH 4/6] Add support for LZO-compressed kernels for ARM Date: Fri, 7 Aug 2009 15:55:24 +0200 Message-ID: <20090807135524.GF4455@laptop> References: <1249311501-23102-2-git-send-email-albin.tonnerre@free-electrons.com> <1249311501-23102-3-git-send-email-albin.tonnerre@free-electrons.com> <1249311501-23102-4-git-send-email-albin.tonnerre@free-electrons.com> <20090806224055.GH31579@n2100.arm.linux.org.uk> <20090807092423.GA4455@laptop> <4A7BF5B8.4030907@knaff.lu> <20090807102117.GB4455@laptop> <4A7C14EB.1060701@parrot.com> <20090807130130.GE4455@laptop> <4A7C2BA4.7030408@parrot.com> Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <4A7C2BA4.7030408@parrot.com> Sender: linux-embedded-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="iso-8859-1" To: Matthieu CASTET Cc: Alain Knaff , Russell King - ARM Linux , "sam@ravnborg.org" , "hpa@zytor.com" , "linux-kernel@vger.kernel.org" , "linux-embedded@vger.kernel.org" , "akpm@linux-foundation.org" On Fri, Aug 07, 2009 at 03:27:00PM +0200, Matthieu CASTET wrote : > Albin Tonnerre a =E9crit : > > On Fri, Aug 07, 2009 at 01:50:03PM +0200, Matthieu CASTET wrote : > >> Albin Tonnerre a =E9crit : > >>> On Fri, Aug 07, 2009 at 11:36:56AM +0200, Alain Knaff wrote : > >>>> On 08/07/09 11:24, Albin Tonnerre wrote: > >>>>> Regards, > >>>> Could it be that the patches that remove division (zutil.h and i= nflate.c) > >>>> have somehow not been applied? > >>> Indeed, they've not been applied. However, I'd rather try to unde= rstand why > >>> exactly this is an issue when compiling with -Os and not -O2 inst= ead of working > >>> around it by removing the divisions. > >> Look at the generated code. > >> Arm doesn't have division instruction. > >> May be at -Os gcc emit a call to the software division, but at -O2= it > >> manage to optimise the division (transform it in shift, inline som= e > >> builtin, ...). > > Yes, I figured that out. What I don't get, though, is that it fails= while the > > software division symbol (__aeabi_uidivmod here) does seem to be pr= ovided by > > libgcc. > AFAIK we don't link the kernel with libgcc. > That's why the kernel provide __aeabi_* in arch/arm/lib That's true for the actual kernel image, but not for the bootstrap code= we use when compiling compressed kernels. arch/arm/boot/compressed/Makefile us= es libgcc, unless I'm overlooking something here: arm-unknown-linux-uclibcgnueabi-ld -EL --defsym zreladdr=3D0x20008= 000 --defsym initrd_phys=3D0x20410000 --defsym params_phys=3D0x20000100 -= p --no-undefined -X /home/albin/x-tools/arm-unknown-linux-uclibcgnueabi/lib/gcc/arm-unkno= wn-linux-uclibcgnueabi/4.3.2/libgcc.a -T arch/arm/boot/compressed/vmlinux.lds arch/arm/boot/compressed/head= =2Eo arch/arm/boot/compressed/piggy.gzip.o arch/arm/boot/compressed/misc.o= -o arch/arm/boot/compressed/vmlinux Regards, --=20 Albin Tonnerre, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com