This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Binary file generation revisited
- From: harri dot siirtola at vtt dot fi
- To: Jonathan Larmour <jlarmour at redhat dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Fri, 04 Jan 2002 13:06:32 +0200
- Subject: Re: [ECOS] Binary file generation revisited
- References: <4.3.2.7.2.20020102215257.00b41500@vttmail.vtt.fi>
At 01:54 4.1.2002 +0000, Jonathan Larmour wrote:
> > >> and if I execute "arm-elf-objcopy -O binary myfile.out myfile.bin",
> > >> myfile.bin is >15 megabytes!!!
> >
> > >Upgrade your binutils.
> > >Jifl
> >
> > I upgraded to snapshot 011227 with no luck. Result is 15 770 156 bytes...
> > is there something special about makefiles when building a ROM image (other
> > than suppressing debug info)?
>
>It looks like I may have been mistaking your problem with a known bug in
>some versions of binutils.
>
>What does "arm-elf-objdump -h" on the *ELF* version of the file (i.e.
>myfile.out) say? In particular, look at the LMA - that should indicate some
>section with an address about 16Mb away from the rest.
Yes, that's what was wrong. I missed the point that objcopy makes a
continuous memory image padding holes with zeros. My mistake was using a
RAM-like linker script, so data at 0x0010 0000 and code at 0x0100 0000
resulted to a huge binary.
The "LOADADDR" directive (as used in eCos ROM startup examples) is the key.
>Jifl
Thanks for your reply,
Harri