Re: size of the code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



B Srinivas wrote:
Hi,

I have compiled a library for 64 bit mips big-endian system . and I
find that the size of this is


considerably more than the compiled code for i386 32 bit. Is this a
normal behavior ? and what is or could be the reason.?



Thanks



Regards

Srinivas


There are two reasons for this difference:

- MIPS, as you said it, is a 64 bit architecture. In order to store variables
in the .data/.rodata segments, it has to use 64 bits == 8 bytes of storage.
A "classical" 32 bit architecture would only use 32 bits == 4 bytes for the
same variable.

- MIPS is a RISC architecture, implying that all instructions are coded on 64
bits. A CISC architecture like the IA32 have different instruction sizes for
each instruction. For example, a common and heavily-used instruction like
"push %eax" will be expressed with only 1 byte.

So these two factors are surely the main reason for the "binary inflation" you've
noticed.
I don't know precisely the MIPS architecture, so I hope somebody will correct me
if I said dumb things :)

	Renaud

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux