linux-mips-fnet
[Top] [All Lists]

Re: binutils question

To: linux-mips@fnet.fr
Subject: Re: binutils question
From: Ralf Baechle <ralf@waldorf-gmbh.de>
Date: Sun, 3 Sep 1995 01:45:14 +0200 (MET DST)
In-reply-to: <199509021122.NAA19751@euromath.vma.bme.hu> from "Szemethy Tivadar" at Sep 2, 95 01:22:55 pm
Hi all,

> Last night I tried to install binutils (with the patches)on a linux box 
> (as cross-tools), and realized that the configuration doesn't support
> anything like mipsel-linux or similar (mipsllinux), only mips-elf.

You must have made something wrong.  Something like the following should
work for you, too:

  tar zxf /pub/gnu/binutils-2.5.2.tar.gz
  cd binutils-2.5.2
  gzip -cd /pub/linux/mips/crossdev/src/binutils-2.5.2-6.diffs.gz | patch -p1
  ./configure --prefix=/usr/local --host=sparcling-table-water \
       -target=mipsel-linux
  make CC=gcc CFLAGS="-O2 -vomit-frame-pointer -keep-programmer-inline" \
       LDFLAGS=-s
  make install

Maybe you just omited the -p option from patch?  You must ALWAYS give a
-p option to patch or new files will be created in the current directory!

> Is that true ? Is it entirely ELF now ?

ELF is only a option that you get when configuring for mips{el}-linuxelf.
mips{el}-linux is just the same, but with a.out format.  Please note that
all Linux ports have a special a.out flavour.  The .text section starts
not 4096 bytes (as usual) but only 1024 bytes from the begining of the
file.  The generic a.out configuration for mips will therefore NOT work.

For the generation of ELF binaries the mips{el}-elf configuration is
sufficient.  The linux configurations have additional support for a.out
and COFF (required for Milo, eg.).

And - back to your question - the big ELF day is still waiting to come ...

> Anyway, I'm trying with mips-ecoff now. I just need COFF files to play
> with the pmax bootloader.
> I thought that mips-ecoff and mips-linuxaout would be the same, or at least
> very similar, but it looks like they aren't.
> Or am I completely wrong ? If I am, I speak executable files of type '407'
> where the .data and .text can be loaded at once (according to my netbsd 
> sources)
> Someone plase enlighten me...

Both executable types support the 0407 (octal!) type.  It mean impure
executable and for a.out also possibly object file.  Though a.out and (E)COFF
are completly different formats.

Just as a warning: when you use the crossbinutils' strip command to strip
a impure (0407) COFF executable,  a bug in strip will convert it into a
demand paged (0413) COFF executable.  This bug was quite nervragging when
I still used the Tyne board.

    Ralf

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