Re: objcopy problems
"Jaysen Roper" <[email protected]> Tue, 12 Aug 2008 11:15:39 +0100
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers.coldfire |
|---|---|
| Message-ID | <001501c8fc64$5ed92f40$1c8b8dc0$@com> |
Ahh, big sigh. The libstd / libc / libm and other standard libraries are multilib'ed (I had to look that up) but the board specific libs are not. They only exist in one place, we don't even have a non-debug build of the board specific libs from the vendor. And no source to rebuild with. Ho hum. These are the .o's and .a's that are coming up as 68020 arch. Perhaps these 2 screen dumps will shed some light.... -------------------------------------------------------- C:\Games\heber\demo>make demo.o m68k-coff-gcc -c -I. -I/heber/pluto6/libs/peripherals/pluto6/81-16631-10 -I/heber/pluto6/libs/hardware/pluto6/81-16616- 16 -I/heber/pluto6/libs/customperipherals/pluto6/81-17315-5 -I/heber/pluto6/libs/interface/pluto6/81-17292-7 -fno-inline -Wcast-align -Wcast-qual -Wall -O0 -m5200 -msoft-float -D__mod2__=void -DIN_GCC=1 -nostdinc -gstabs+ demo.c -o demo.o C:\Games\heber\demo>m68k-coff-objdump -x demo.o |more demo.o: file format coff-m68k demo.o architecture: m68k:68020, flags 0x00000031: HAS_RELOC, HAS_SYMS, HAS_LOCALS start address 0x00000000 -------------------------------------------------------- C:\Games\heber\demo>cs-make demo.o m68k-elf-gcc -c -I. -I/heber/pluto6/libs/peripherals/pluto6/81-16631-10 -I/heber/pluto6/libs/hardware/pluto6/81-16616-1 6 -I/heber/pluto6/libs/customperipherals/pluto6/81-17315-5 -I/heber/pluto6/libs/interface/pluto6/81-17292-7 -fno-inline -Wcast-align -Wcast-qual -Wall -O0 -m5200 -msoft-float -D__mod2__=void -DIN_GCC=1 -nostdinc -gstabs+ demo.c -o demo.o C:\Games\heber\demo>m68k-elf-objdump -x demo.o |more demo.o: file format elf32-m68k demo.o architecture: m68k:isa-a:nodiv, flags 0x00000011: HAS_RELOC, HAS_SYMS start address 0x00000000 ------------------------------------------------------------------- -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Chris Johns Sent: 11 August 2008 23:00 To: Jaysen Roper Subject: Spam:**********, Re: Spam:**********, Re: [ColdFire] objcopy problems X-SpamDetect-Info: ------------- Start ASpam results --------------- X-SpamDetect-Info: This message may be spam. This message BODY has been altered to show you the spam information X-SpamDetect: **********: 10.400001 From3consonants=0.3, SPF Soft=3.0, Symbol & DodgySrc=2.0, DodgySource=2.0, SPF Default Fail=2.5, X-Verify-SMTP present=0.6 X-SpamDetect-Info: ------------- End ASpam results ----------------- Jaysen Roper wrote: > I installed the elf toolchain from codesourcery, it went on easily enough > and after sorting out PATH environments it works fine alongside our original > gnu install. I can use both toolchains independently. > > But the elf-objcopy doesn't work when used with our coff-build (although it > doesn't crash) > > C:\Games\heber\demo>m68k-elf-objcopy --debugging -O ieee -R .id -R .system > demo.cof demo.iee > demo.cof: .stab: stab entry 1 is corrupt, strx = 0xd3000000, type = 8 > demo.cof: .stab: stab entry 3 is corrupt, strx = 0x0, type = 37 > demo.cof: .stab: stab entry 4 is corrupt, strx = 0x0, type = 84 > demo.cof: .stab: stab entry 5 is corrupt, strx = 0x0, type = 110 > demo.cof: .stab: stab entry 6 is corrupt, strx = 0x0, type = 162 > demo.cof: .stab: stab entry 7 is corrupt, strx = 0x0, type = 218 > demo.cof: .stab: stab entry 8 is corrupt, strx = 0x1, type = 23 > > --------------------------- > > So it looks like I cant mix toolchain tools. (mix coff compilers and elf > objcopy) For my tools which are rtems ones the BFD support for coff is built into the elf build of objcopy. I suspect the Codesourcery tools are the same. This looks like a bug in the old compiler and the coff debug information. $ /opt/rtems-4.9/bin/m68k-rtems4.9-objcopy [ snip ] /opt/rtems-4.9/bin/m68k-rtems4.9-objcopy: supported targets: elf32-m68k coff-m68k versados ieee a.out-zero-big elf32-l ittle elf32-big srec symbolsrec tekhex binary ihex > I've tried a full rebuild with the new ELF toolchain but get architecture > problems with our libraries at ld stage. > The example below is a single example, every .o file in our library (3rd > party, no src) produces this error. > > m68k-elf-ld: m68k:68020 architecture of input file > `/heber/pluto6/libs/gnu/pluto6\libdbug.a(dbug-outbyte.o)' is incompatible > with m68k:isa-a:nodiv output You need to provide the command line used to build the object file. At a guess it looks like the options you used to build the dbug-outbyte.o are wrong. Please try: $ m68k-elf-gcc --target-help and check your compile options. > So It looks like my libraries are compiled as 68020 (and I cant change that) > And the codesourcery tools are hardcoded to isa-a (coldfire) I doubt this. I think they will have multilib'ed their tools. > > Is there an old coff-objcopy out there I could use? I don't have the means > to rebuild it though. My version is 2.9.1 (1997) > Given the age of the tools you are using it will be difficult. Regards Chris --- [email protected] Send a post to the list. [email protected] Join the list. [email protected] Join the list in digest mode. [email protected] Leave the list. --- [email protected] Send a post to the list. [email protected] Join the list. [email protected] Join the list in digest mode. [email protected] Leave the list.