linux-mips
[Top] [All Lists]

egcs 1.0.3a-2 crosscompiler behavior

To: SGI news group <linux-mips@oss.sgi.com>
Subject: egcs 1.0.3a-2 crosscompiler behavior
From: Brady Brown <bbrown@ti.com>
Date: Wed, 19 Jul 2000 15:11:37 -0600
Organization: Texas Instruments
Sender: owner-linux-mips@oss.sgi.com
I have several steps in my build process where I use the linker to link
a pure binary file (usually a zipped image) into a relocatable elf file,
which is then linked with other elf files to create a final image. I am
running the mipsel-linux cross compiler tool chain on an i386. After
upgrading the tools to egcs 1.0.3a-2 the linking of this binary file
fails.

Example:
mipsel-linux-ld -T link.script -r -b binary image.gz -o image.o

link.script file contents are:
OUTPUT_FORMAT("elf32-littlemips")
OUTPUT_ARCH(mips)
SECTIONS
{
    .data :
    {
        image_start = .;
        *(.data)
        image_end = .;
      }
}

The normal output from the old linker was:
mipsel-linux-ld: image.gz: compiled for a little endian system and
target is little endian

The new linker gives:
mipsel-linux-ld: image.gz: compiled for a little endian system and
target is big endian
File in wrong format: failed to merge target specific data of file
image.gz?
make[1]: *** [image.o] Error 1

I have been unable to figure out why the linker thinks the target is big
endian and have yet to find a way to get this to work. Any ideas?
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Brady Brown (bbrown@ti.com)       Work:(801)619-6103
Texas Instruments: Broadband Access Group
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



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