This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Binary file generation revisited


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]