This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: objdump for binary file
- To: "'Jonathan Larmour'" <jlarmour at redhat dot com>,"'Grant Edwards'" <grante at visi dot com>
- Subject: RE: [ECOS] objdump for binary file
- From: "Trenton D. Adams" <tadams at theone dot dnsalias dot com>
- Date: Tue, 21 Aug 2001 14:07:18 -0600
- Cc: "'Trenton D. Adams'" <tadams at extremeeng dot com>,"'eCos Discussion'" <ecos-discuss at sourceware dot cygnus dot com>
Although that was very cool! ;) I don't have source code or object
code! :)
-----Original Message-----
From: ecos-discuss-owner@sources.redhat.com
[mailto:ecos-discuss-owner@sources.redhat.com] On Behalf Of Jonathan
Larmour
Sent: Tuesday, August 21, 2001 2:02 PM
To: Grant Edwards
Cc: Trenton D. Adams; 'eCos Discussion'
Subject: Re: [ECOS] objdump for binary file
Grant Edwards wrote:
>
> On Tue, Aug 21, 2001 at 01:23:22PM -0600, Trenton D. Adams wrote:
>
> > I compiled an eCos program and then copied it to a binary file. Is
> > there a way of dumping the assembly now?
>
> No.
Yes :-). It's not pretty and you've lost all the symbol info, but you
can
disassemble everything (including data!). e.g.
echo > foo.c
arm-elf-gcc -c -o foo.o foo.c
arm-elf-objcopy --remove-section=.text foo.o
arm-elf-objcopy --add-section=.text=thebinfile foo.o
arm-elf-objcopy
--set-section-flags=.text=alloc,load,code,contents,readonly
foo.o
arm-elf-objdump -d foo.o
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223)
271062
Maybe this world is another planet's Hell -Aldous Huxley ||
Opinions==mine