m68k-rtems-gcc output file format

Joel Sherrill joel.sherrill at OARcorp.com
Sat Feb 26 14:49:37 UTC 2000



> "Kim, Jeong-Hwan" wrote:
> 
> Hi, everyone
> I am beginning with m68k-rtems-gcc compiler.
> My target is M68K.
> I wonder what format does m68k-rtems-gcc compiler support for output
> file.
> Does it produce executable file in S-Record format or Intel Hex
> format?

By default the output of as/gcc/ld is coff or elf depending on 
which version of the tools and patches you have.  The 4.0 era
used coff.  Recently most of the tool targets changed to elf.

The output produced by the linking process is often converted
to another object format so it can be downloaded to a target board.
Many of the m68k BSPs use objcopy to produce Srecords -- especially
the mvme* ones.

The file named ".exe" for all BSPs is appropriate for download
to the target -- whatever that format is.

> And I have a another problem.
> When I wrote a very simple code and compiled with m68k-rtems-gcc
> and checked with  bfd library, bfd_check_format() with bfd_object
> type,
> the function returned error.
> What reason do you think it happened ...?

Why are you in the bowels of the bfd library?  Surely you invoked
some binutils tool and are reporting a debugger path.

If on UNIX, use "file XXX" to figure this out.  m68k-rtems-objdump
is also useful.  If it is an Srecords file, you can always just look
at it with an editor and confirm it.

More than likely the file you are looking at is m68k-coff.
 
> Kim
> 
> 
> 

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985



More information about the users mailing list