[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Instruction count
From: |
Anubhav |
Subject: |
Re: [avr-gcc-list] Instruction count |
Date: |
Wed, 15 Jan 2003 12:30:42 -0800 (PST) |
Hi,
Thanks to folks on the mailing list, I was able
to disassemble the program.
I had compiled the program for two platforms x86 using
gcc and atmega128 using avrgcc.
Had expected the atmega128 to have the larger binary
since its a 8 bit CPU and therefore should take more
than four times as many instructions as on the 32 bit
intel cpu but the avr executables are approximately 3
times smaller than intel (infact the intel compiled
version is dynamically linked as well which should
further reduce the size.) Can somebody tell me what i
am missing here ?
The specs of the two executables are as follows
ELF 32-bit LSB executable, version 1 (SYSV),
statically linked, not stripped (for the Atmega128)
and
ELF 32-bit LSB executable, Intel 80386, version 1
(SYSV), dynamically linked (uses shared libs), not
stripped (for x86)
Thanks,
Anubhav
--- "Theodore A. Roth" <address@hidden> wrote:
>
>
> On Wed, 15 Jan 2003, Anubhav wrote:
>
> :) Hi Folks,
> :) I am compiling a file using avr-gcc for
> atmega
> :) 128. I wanted to get the number of instructions
> in the
> :) program.
> :)
> :) I can get the disassembeled file using objdump -d
> for
> :) a gcc compiled ELF for x86 platform. but when i
> use
> :) this with avr compiled ELF, it exits saying
> unknown
> :) architecture.
> :)
> :) Is there a similar program
> :) or can I compile the source with some options to
> spit
> :) out the file containing instructions in a
> readable
> :) format ?
>
> Did you try avr-objdump?
>
> If you give objdump the --help option it will tell
> what architectures and
> targets it was compiled for. From my linux box:
>
> $ avr-objdump --help
> <snip>
> avr-objdump: supported targets: elf32-avr
> elf32-little elf32-big srec symbolsrec tekhex binary
> ihex
> avr-objdump: supported architectures: avr avr:1
> avr:2 avr:3 avr:4 avr:5
> Report bugs to address@hidden
>
> $ objdump --help
> <snip>
> objdump: supported targets: elf32-i386
> a.out-i386-linux efi-app-ia32 elf32-little elf32-big
> srec symbolsrec tekhex binary ihex trad-core
> objdump: supported architectures: i386 i386:x86-64
> i8086 i386:x86-64:intel i386:intel
> Report bugs to address@hidden and
> address@hidden
>
> Notice the difference.
>
> Ted Roth
>
> avr-gcc-list at http://avr1.org
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
avr-gcc-list at http://avr1.org