This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [M16C-ELF] : S-REC file generated by ObjCopy is greater than input file (*.x or *.out)
- From: Bernd Jendrissek <berndj at prism dot co dot za>
- To: Prafulla Thakare <PrafullaT at KPITCummins dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 22 Dec 2005 11:39:42 +0200
- Subject: Re: [M16C-ELF] : S-REC file generated by ObjCopy is greater than input file (*.x or *.out)
- References: <4A1BE23A7B777442B60F4B4916AE0F13095093AC@sohm.kpit.com>
-----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-----