This is the mail archive of the
ecos-devel@sourceware.org
mailing list for the eCos project.
Re: bug in RedBoot ELF loader?
- From: Bert Thomas <bert at brothom dot nl>
- To: David Vrabel <dvrabel at arcom dot com>, ecos-devel at ecos dot sourceware dot org
- Date: Tue, 06 Jun 2006 19:05:46 +0100
- Subject: Re: bug in RedBoot ELF loader?
- References: <44857F82.1020302@brothom.nl> <448596BD.30304@arcom.com>
David Vrabel wrote:
Bert Thomas wrote:
Example:
An ELF file with 2 segments:
segment 0: offset in file = 0, length = 0xac
segment 1: offset in file = 0xac, length = 15
An ELF with a section having a file offset of 0 looks bogus to me. Why
would you need to load the ELF header into RAM?
Example: readelf -a /bin/ls
<deletia>
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
PHDR 0x000034 0x08048034 0x08048034 0x000e0 0x000e0 R E 0x4
INTERP 0x000114 0x08048114 0x08048114 0x00013 0x00013 R 0x1
[Requesting program interpreter: /lib/ld-linux.so.2]
LOAD 0x000000 0x08048000 0x08048000 0x0e994 0x0e994 R E 0x1000
LOAD 0x00f000 0x08057000 0x08057000 0x003c0 0x0074c RW 0x1000
DYNAMIC 0x00f188 0x08057188 0x08057188 0x000d0 0x000d0 RW 0x4
NOTE 0x000128 0x08048128 0x08048128 0x00020 0x00020 R 0x4
GNU_EH_FRAME 0x00e968 0x08056968 0x08056968 0x0002c 0x0002c R 0x4
<deletia>
Read:
http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html
"(it's normal behavior for a program to include its ELF header and
program header table in its memory image)"
I'd aggree with you however...
Bert