problem with sparc-elf gcc cross-compiler under fedora 8

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

 



Hi,
We are getting different and broken object file output running the same gcc
cross-compiler on different machines with different versions of fedora.

There are no errors, just different binary output.  Most files compile to
identical object files on both machines, but some don't.  The program built
on the fedora 8 machine when run on the embedded system reboots somewhere in
its startup sequence continuously.  The one built on the older machine runs
fine.

We suspect the problem may be with the different versions of shared library
residing on the local machine, libc (2.2.93 in the working case and 2.7 in
the non-working case)  However all attempts to reproduce the shared library
environment on the working machine using LD_LIBRARY_PATH have failed. Please
see script at bottom of this email.  Below is the shared library
dependencies of the assembler which is producing different output from
identical assembly output (.s file) input.

As an last resort we are considering downgrading to Fedora 6, the last known
version on which we know the compile works.  We don't have the option of
rebuilding the cross-compiler at this point since we don't want to break
anybody else.

Thanks for any insights you might have.

Jim


Buiding on machine 1 produces bad output, while building on machine 2
produces correct output.

this is the compiler:
compiler/2.95.2/sparc-elf/bin/sparc-elf-g++

Dependency output

> ldd compiler/2.95.2/sparc-elf/sparc-elf/bin/as
linux-gate.so.1 =>  (0x00110000)
        libc.so.6 => /lib/libc.so.6 (0x049bb000)
        /lib/ld-linux.so.2 (0x001f3000)

        Version information:
        /export/dev/compiler/2.95.2/sparc-elf/sparc-elf/bin/as:
                libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
                libc.so.6 (GLIBC_2.1) => /lib/libc.so.6
                libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
        /lib/libc.so.6:
                ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
                ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2
                ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2

The GLIBC libraries are version 2.7 on barbrady: 		 	

ll /lib/libc.so.6 lrwxrwxrwx 1 root root 11
2008-04-08 07:12 /lib/libc.so.6 ->
libc-2.7.so*
ll /lib/ld-linux.so.2 lrwxrwxrwx 1 root root 9 2008-04-08 07:12
/lib/ld-linux.so.2 ->
ld-2.7.so*
[

Machine 2:
       libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

        Version information:
        /export/dev/compiler/2.95.2/sparc-elf/sparc-elf/bin/as:
                libc.so.6 (GLIBC_2.1.3) => /lib/i686/libc.so.6
                libc.so.6 (GLIBC_2.1) => /lib/i686/libc.so.6
                libc.so.6 (GLIBC_2.0) => /lib/i686/libc.so.6
        /lib/i686/libc.so.6:
                ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
                ld-linux.so.2 (GLIBC_2.0) => /lib/ld-linux.so.2
                ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2

The GLIBC libraries are version 2.2.93 on machine 2:

ll /lib/i686/libc.so.6
lrwxrwxrwx    1 root     root           14 Oct 28
2003 /lib/i686/libc.so.6 -> libc-2.2.93.so* 

ll /lib/i686/ld-linux.so.2
lrwxrwxrwx    1 root     root           14 Jan 14
2004 /lib/ld-linux.so.2 -> ./ld-2.2.93.so*


Script to run assembler on machine 1 with machine 2's /lib mounted.


#! /bin/tcsh
setenv LD_LIBRARY_PATH /var/tmp/machine2/lib echo $LD_LIBRARY_PATH
/var/tmp/machine2/lib/ld-linux.so.2
/export/dev/compiler/2.95.2/sparc-elf/sparc-elf/bin/as -a -V -Qy -s -o
navigapp_machine2libs.o navigapp.s > navigapp_machine2libs.l


if you diff the binary files you get differences like this
 
Bad file:
0066420 7453 6572 6d61 6e69 4167 7373 7465 0000 0066440 0000 0000 0000 0000
0000 0000 0000 0000 0066460 0000 0000 0000 0000 0000 0000 0000 0000 0066500
0000 0000 0000 0000 0000 0000 0000 0000 0066520 0000 0000 0000 0000 0000
0000 0000 0000 0066540 0000 0000 0000 0000 0000 0000 0000 0000 0066560 0000
0000 0000 0000 0000 0000 0000 0000 0066600 0000 0000 0000 0000 0000 0000
0000 0000 0066620 0000 0000 0000 0000 0000 0000 0000 0000 0066640 0000 0000
0000 0000 0000 0000 0000 0000 0066660 0000 0000 0000 0000 0000 0000 0000
0000 0066700 0000 0000 0000 0000 0000 0000 0000 0000 0066720 0000 0000 0000
0000 0000 0000 0000 0000 0066740 0000 0000 0000 0000 0000 0000 0000 0000
0066760 0000 0000 0000 0000 0000 0000 0000 0000 0067000 0000 0000 0000 0000
0000 0000 0000 0000 0067020 0000 0000 0000 0000 0000 0000 0000 0000 0067040
0000 0000 0000 0000 0000 0000 0000 0000 0067060 0000 0000 0000 0000 0000
0000 0000 0000

Good file:

0066420 7453 6572 6d61 6e69 4167 7373 7465 0000 0066440 0000 3c00 0000 071a
0000 0000 0000 5800 0066460 0000 071b 0000 0000 0000 7000 0000 0906 0066500
0000 3001 0000 7400 0000 0c06 0000 3001 0066520 0000 7800 0000 071c 0000
0000 0000 b800 0066540 0000 0906 0000 a801 0000 c400 0000 071d 0066560 0000
0000 0000 d400 0000 071e 0000 0000 0066600 0000 d800 0000 0c06 0000 a801
0000 e400 0066620 0000 091f 0000 0000 0000 e800 0000 0c1f 0066640 0000 0000
0000 f000 0000 0720 0000 0000 0066660 0000 3401 0000 091f 0000 0000 0000
3801 0066700 0000 0906 0000 9801 0000 3c01 0000 0c1f 0066720 0000 0000 0000
4001 0000 0c06 0000 9801 0066740 0000 4401 0000 0721 0000 0000 0000 5801
0066760 0000 0c1f 0000 0000 0000 6401 0000 0720 0067000 0000 0000 0000 9001
0000 0906 0000 3001 0067020 0000 9401 0000 0c06 0000 3001 0000 9c01 0067040
0000 0c06 0000 3001 0000 3802 0000 071d


-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux