Re: Issues Building GNU GCC 4.5.4 - IRIX 5.3XFS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/2/23 14:06, Darcy Wilson via Gcc-help wrote:
Hi there,


This looks like a fun little project :)


Object file format error in: /usr/tgcware/gcc45/lib/gcc/mips-sgi-irix5.3/4.5.3/irix-crti.o: bad symbolic header (magic number)
collect2: ld returned 1 exit status


Yikes.

Can you dump out the first 16 bytes of that file please ?

Better yet can you compile a hello.c like so :

io$ cat hello.c
#define _XOPEN_SOURCE 500
#include <stdio.h>
int
main ( int argc, char **argv )
{
    printf("This is 32-bit armv7l.\n");
    return 42;
}

io$ $CC $CFLAGS $CPPFLAGS -c -o hello.o hello.c

io$ file hello.o
hello.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), with debug_info, not stripped

io$ od -Ax -t x1 -v -N 32  hello.o
000000 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
000010 01 00 28 00 01 00 00 00 00 00 00 00 00 00 00 00
000020

My hope is that the first four bytes you see in irix-crti.o are just the
usual 0x7F 45 4C 46 for an ELF file.

The next three bytes on your machine may be interesting and I also hope
they are 01 01 01. I do not recall if the old MIPS R4400 was big endian
or not. So one of those bytes may be a 02. Then in offset 0x12 you
should have either :

#define EM_MIPS      8  /* MIPS R3000 big-endian */
#define EM_MIPS_RS3_LE  10  /* MIPS R3000 little-endian */

Regardless you have software that came from someone else and you really
do not know how it was built nor what hardware ( if any ) was used. So
it would be nice to know that the ELF files are actually reasonable on
the cool MIPS R4400 snazzy box you have there.


It's calling ld from,

/usr/bin/../lib/ld

And then the build process stops, saying that the C Compiler cannot

Yeah ... it would do that if the software really doesn't work on your
hardware.


Any help would be appreciated


Let's start by just seeing if you can run gcc --version and then gcc -v
with whatever you have there from the planet Jupiter.

Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux