This is the mail archive of the
ecos-devel@sourceware.org
mailing list for the eCos project.
RE: bug in RedBoot ELF loader?
- From: "Daly, Jeffrey" <jeffrey dot daly at intel dot com>
- To: "eCos development" <ecos-devel at ecos dot sourceware dot org>
- Date: Wed, 7 Jun 2006 06:03:28 -0400
- Subject: RE: bug in RedBoot ELF loader?
Uh, are you confusing the difference between the disk image of a program
(which has the headers) and the the memory image of the program (which
only includes the instructions/data)?
-----Original Message-----
From: ecos-devel-owner@ecos.sourceware.org
[mailto:ecos-devel-owner@ecos.sourceware.org] On Behalf Of Bert Thomas
Sent: Wednesday, June 07, 2006 5:38 AM
To: Gary Thomas
Cc: eCos development
Subject: Re: bug in RedBoot ELF loader?
> Of course - the headers are just that; descriptions of stuff to come
> _later_ in the file. A sane ELF file (files created by GNU ld behave
> this way) will have the various section headers first, followed by
> the actual program segments. There is no need for a loader (like
> RedBoot which is what started this discussion) to ever load the
> headers as part of the image, rather only process them to figure
> out what needs to be loaded and where. For example, a RAM program
I aggree with you on the sanity part. However, I bet that most if not
all Linux executables have a segment that include the headers. I assume
you are working on a Linux machine. Could you try readelf on ls for
example?
Again, it is not that I disaggree with you. It is just that I observe it
isn't the way you and I expected it to be.
I suspect the reason that your example doesn't have a segment that
includes the headers has something to do with the linker script you
wrote to link that program.
Bert