This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.


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

objcopy endian question



Hi,

I have a problem and don't know where to begin looking.  Here is the
background:

+ binutils 2.9.1
+ RTEMS targetting a i386 PC
+ host system: RedHat Linux 5.0 x86
+ toolset targets: i386-rtems and i386-rtemself

We are using the grub bootloader to load our linked applications.  This
loader expects a.out files.  The CPU is already in protected mode when our
application gets control, so we do not have any 16-bit/real mode code. The
build procedure links a "native format" executable (coff for i386-rtems,
elf for i386-rtemself).  Then we use objcopy to generate the a.out
expected by the boot loader.

This works marvelously when using the COFF i386-rtems toolset.  

When using the ELF based i386-rtemself, it looks like the initialized data
in the a.out file generated by objcopy is endian swapped.

Any suggestions on what might be going wrong?  My guess is that something
is not properly honoring endianness.

Thanks in advance for any ideas.

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