Re: Average instruction length in x86-built kernel?

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

 



Hi Karim,

On Friday 29 July 2005 23:32, Karim Yaghmour wrote:
> Googling around, I can find references claiming that the average
> instruction length on x86 is anywhere from 2.7 to 3.5 bytes, but I
> can't find anything studying Linux specifically.

This is not that hard to find out yourself:

Just study the output od objdump -d and average the differences
of the first hex number in a line printed, which are followed by a ":"

e.g.


scripts/kconfig/mconf.o:     file format elf32-i386

Disassembly of section .text:

00000000 <init_wsize>:
       0:	83 ec 1c             	sub    $0x1c,%esp
       3:	8d 44 24 10          	lea    0x10(%esp),%eax
       7:	89 44 24 08          	mov    %eax,0x8(%esp)

so avg(3-7, 3-0) = 2.5

and so on...


Happy analyzing!


Regards

Ingo Oeser

Attachment: pgp3ap722x5fL.pgp
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux