[M16C-ELF] : S-REC file generated by ObjCopy is greater than input file (*.x or *.out)

Bernd Jendrissek berndj@prism.co.za
Thu Dec 22 09:42:00 GMT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, Dec 22, 2005 at 02:59:34PM +0530, Prafulla Thakare wrote:
> #m32c-elf-gcc foo.c -o my.x -mcpu=m16c -msim -g
> Output File -> my.x {Size = 114KB}
> 
> #m32c-elf-objcopy -O srec my.x  big.mot
> Output File -> big.mot {Size = 227KB}
> 
> What could be the reason for above behavior? 
> Is it a bug with objcopy?

No problem at all; the bulk of your SREC-format file is an ASCII hexdump
of the contents of the ELF sections, which inherently and inevitably
doubles-up every byte.

Your ELF-format file contains some headers too, which are *not*
hexdumped, which explains why 227 < 114*2.

- -- 
Your Mom is so dumb that she tried to minimize a 12
variable function to a minimal sum of products expression using a
karnaugh map instead of the Quine-McCluskey Algorithm.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Please fetch my new key 804177F8 from hkp://wwwkeys.eu.pgp.net/

iD8DBQFDqnRXwyMv24BBd/gRAlNTAJ0VrJBbJBkmOPCM32K2vZP1LEPitwCeMrdz
QR2YZ06HbGL0txSe5Mk8umY=
=pu+H
-----END PGP SIGNATURE-----



More information about the Binutils mailing list