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] |
Hi, When I do: # file a.out on old (running) binary, it shows : a.out: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.4.17, dynamically linked (uses shared libs), not stripped Which has " GNU/Linux 2.4.17 " clearly diffrent from the new one ("GNU/Linux 2.4.3") , as Chuck said. I made changes to "crosstool.sh" in crosstool-0.38: ..... --enable-kernel=2.4.17 ...... which was --enable-kernel=2.4.3 earlier. Then I build new toolchain arm-9tdmi-linux-gnu. Using new arm-9tdmi-linux-gnu I built, I do : # arm-9tdmi-linux-gnu-gcc -static hello.c # ./a.out Illegal instruction # file a.out a.out: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 2.4.17, statically linked, not stripped # arm-9tdmi-linux-gnu-gcc -shared hello.c # ./a.out Segmentation fault # file ./a.out gives a.out: ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped # arm-9tdmi-linux-gnu-gcc testcpro.c # ./a.out -sh: ./a.out: not found # file a.out a.out: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 2.4.17, dynamically linked (uses shared libs), not stripped Here I can find another notable difference: " ARM, version 1 (SYSV), " and " ARM, version 1 (ARM), " I hv tried with " --enable-kernel=2.6.10 " in " crosstool.sh " also. Plz tell me the possibilities Thanx Pramod P K On 11/9/05, Chuck Meade <chuckmeade@mindspring.com> wrote: > 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 > > > -- ---------------------------------------------------------------- PRAMOD P. K., <pra.engr@gmail.com> CDMA: 91- 9242195490. ---------------------------------------------------------------- ------ 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] |