[uClibc] toolchain: ppc assembler error ( .section ".relocate_code", "xa") when compiling linux 2.6.1 kernel???

Ken McGuire kenm at desertweyr.com
Tue Aug 24 04:09:46 UTC 2004


I guess I'll reply to my post as an update.
 I  regressed binutils to 2.14.90.0.7 from the 2.95 toolchain part of cvs. I was able to use this 
and buildroot to build a working uClibc-2.95 toolcahin & root fs including busybox. I then was able 
to use the toolchain to build a 2.4.25 kernel for my Motorola MCP750/HA CPCI board. It booted fine 
over the network and I was then able to copy the rootfs to a hdd and the kernel to a PREP 
partition. The combo booted off the hdd. I was then able to create a initrd from the rootfs I built 
using buildroot & busybox 1.0rc3, that combo booted via the network. So I now have a working PPC 
system.
 The net is littered with partly complete PREP architecture PPC kernels and non working 
distributions. After searching high & low I finally decided to start from the sources and build my 
own.Thanks to buildroot, uclibc & busybox this (not without some pain & effort) this was possible 
for a hardware engineer like me to do.

 Thanks to all the uClibc/busybox/buildroot developers for a fine set of tools & discussions which 
answeed most of my stupid questions without me having to really ask them. ;>) 

   ...ken...



On 17 Aug 2004 at 12:50, Ken McGuire wrote:

> I have had the same problem with both toolchain 2.95 and 3.3x from uClibc.org
> 
> It appears to be a binutils issue,  /toolchain/gcc-3.3.x/make/binutils-uclibc.mk and
> /toolchain/gcc-2.95/make/binutils-uclibc.mk were regressed from
> BINUTILS_DIR:=$(TOOL_BUILD_DIR)/binutils-2.14.90.0.7 to
> BINUTILS_DIR:=$(TOOL_BUILD_DIR)/binutils-2.14.90.0.6 to fix building for
> arm, I  think that 2.14.90.0.5 worked with ppc, and there are comments in binutils
> 2.14.90.0.7 &.8 changelogs implying that some ppc issues were fixed, but .6 results in the uitl.S
> issue.
> 
> I found these references to the problen which (I believe) explains the issue (better than I can).
> 
> http://sources.redhat.com/ml/binutils/2003-09/msg00380.html  and 
> http://sources.redhat.com/ml/binutils/2003-09/msg00381.html
> 
> This applies to kernel versions 2.4.18 and above as well as the 2.6 series. The util.S
> code appeared somewhere between 2.4.18pre6 and 2.4.18.
> 
> The 3.4.x toolchain uses bunutils 2.15.91.0.1 (when I tried it, but now uses
> 2.15.91.0.3) and I haven't gotten past an initial error due to stdargs.h not being found.
>  I think somehow my 3.4.x toolchain wasn't built properly, but I haven't figured out why yet.
> 
> 
>   ...ken...
> 
> 
> On 13 Aug 2004 at 16:14, Philip Van-Houtte wrote:
> 
> > Anyone come across the following...
> > 
> > I downloaded 'buildroot.tar.bz2' (dated July 25 2004), and successfully
> > built the tool chain for powerpc: gcc-3.3.4 as-2.14.90.0.6.
> > 
> > When I tried to build a 2.6.1 kernel (zImage.initrd):
> > 
> > arch/ppc/boot/common/util.S: Assembler messages:
> > arch/ppc/boot/common/util.S:220: Warning: setting incorrect section
> > attributes for .relocate_code
> > arch/ppc/boot/common//util.o: File truncated
> > arch/ppc/boot/common/util.S:281: FATAL: Can't write
> > arch/ppc/boot/common//util.o: File truncated
> > make[2]: *** [arch/ppc/boot/common//util.o] Error 1
> > make[1]: *** [arch/ppc/boot/common/] Error 2
> > make: *** [zImage.initrd] Error 2
> > [philip at pcstaging1 kernel]$
> > 
> > Line 220 of util.S is
> >     .section ".relocate_code","xa"
> > 
> > 
> > 
> > 
> > Philip Van-Houtte
> > 
> 
>    ...ken...
> 
> 





More information about the uClibc mailing list