This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: What all should I take care while compiling and running?


Hi Pramod,

> >Question to the original poster -- what is the binary format of your >a.out
> >file?  If it truly is in a.out format, then was your kernel
> configured to >handle
> >the a.out binary format?
>
> Its ELF .
> Yeah... sure, coz I can run the a.out of the same program; compiled
> using the existing (old) GCC in the TARGET.

I verified that those are indeed elf ARM binaries.  However they are built
with a toolset that is compatible with Linux 2.4.3 -- quite old tools.
See the output when I run "file" on the files you sent:

# file arm*
arm-9tdmi-linux-gnu-hello:        ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 2.4.3, dynamically linked (uses
shared libs), not stripped
arm-9tdmi-linux-gnu-hello-static: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 2.4.3, statically linked, not
stripped

Note the "for GNU/Linux 2.4.3".  Check your working a.out file the same
way (use the file command on it).  I bet you will see a substantially
different version number than 2.4.3.  Considering that that kernel
is from March 2001, you can bet that a lot has changed since then in
the kernel, in gcc, glibc, and binutils.

You stated that you are using 2.6.10 as your kernel.  But you also stated
that your older tool versions worked.  Check this to make sure -- it would
be logical that your tools that are capable of building 2.6.10 would be
*newer* than your tools which produce binaries that claim to be "for
GNU/Linux 2.4.3".  Tools generating binaries compatible with 2.4.3 are
plenty old.

Note that by new/old here we are referring to dates associated with tool
versions, not the dates on which you personally built your cross toolsets.

To sum up -- you have a tool version problem.  You need to look closely at
your versions.  You know that the non-working binaries say they are
"for GNU/Linux 2.4.3".  It would be interesting to see the output of the file
command on your working application binary.  Then pick tools that work and
use them consistently and you should be ok.

Chuck



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]