linux-mips
[Top] [All Lists]

Re: cross Mips64-linux binutils problem

To: jimix@watson.ibm.com
Subject: Re: cross Mips64-linux binutils problem
From: Ulf Carlsson <ulfc@calypso.engr.sgi.com>
Date: Wed, 24 May 2000 16:52:02 -0700 (PDT)
Cc: linux@cthulhu.engr.sgi.com
In-reply-to: <14636.15579.327225.215562@kitch0.watson.ibm.com>
Sender: owner-linuxmips@oss.sgi.com
> I'm using binutils-19990825 patched with binutils-19991011.diff

I have used that patch together with the binutils CVS from 19991011 and that
worked for me.  At least for building 32-bit kernel.

> They were obtained from:
>   ftp://ftp.linux.sgi.com/pub/linux/mips/crossdev/src/mips64/
> 
> Are these the latest? If so please read on..

You could try my superpatch that I have on oss.sgi.com.  It's a newer than
Ralf's patch that you have:

        ftp://oss.sgi.com/pub/linux/mips/src/binutils/binutils-000424.diff.gz

It's against the official binutils CVS for the same day.

> I have built them for cross-compiling on AIX.
> Here is the configure invocation:
>   ./configure --host=powerpc-ibm-aix4.3.2.0 --target=mips64-unknown-linux-gnu
> 
> All built and installed fine, however the linker halts using the .o's
> because on an unknoen relocation.
> 
> 
> The following assembler:
> .text
>       .align 4
> .ent  _start , 0
>       .globl    _start
> _start:  
>       dla     $sp, kernelInfoLocal
>       ld      $sp, 0($sp) 
>       daddu   $sp, $sp, 0x6000
>       dla     $25, crtInit  
>       j       $25 
>  #  NOTREACHED
>       j       ra       
> .end   _start
> 
> on irix:
>   $ as -version
>   MIPSpro Compilers: Version 7.2.1
> 
>   $ as -64 -non_shared -mips3 crt0s.s -o crt0s.o
> 
> on aix:
>   $ mips64-unknown-linux-gnu-objdump -r crt0s.o
> 
>   crt0s.o:     file format elf64-bigmips
> ...
> successfully dumps the relocation information.
> 
> if I compiler the same file in aix:
>   $ mips64-unknown-linux-gnu-as -64 -mips3 -non_shared crt0s.s -o crt0s.o
>   $ mips64-unknown-linux-gnu-objdump -r crt0s.o
> 
>   crt0s.o:     file format elf64-bigmips
> 
>   mips64-unknown-linux-gnu-objdump: crt0s.o: File in wrong format
> RELOCATION RECORDS FOR [.text]:

The relocation format for mips64 is very different, and they aren't handled
correctly in this version of binutils.  I think my later patch fixes this. By
the way, compiling 64-bit PIC code using gas is not recommended (yet).

Ulf


<Prev in Thread] Current Thread [Next in Thread>