Re: Loading init and for Coldfire V4e

From: Ben Collins (
Date: Wed Oct 09 2002 - 10:19:04 EST

On Wed, Oct 09, 2002 at 11:14:07AM -0400, Kent Borg wrote:
> In response to my question about how is supposed to get an elf
> file up and running Ben Collins and Erik Andersen suggested I write a
> simple statically linked program. Thanks for your help. (My boss had
> suggested the same thing earlier but I didn't listen to him, the
> kernel list I listened to.)
> Alas, it doesn't simplify matters. I wrote a tivial program (all it
> does is a link instruction to make an empty stack frame, two moves, an
> unlink to remove the empty stack frame, and a return--only 5
> instructions long) but it is still an elf file. And, following
> through the code, the kernel still wants to load, it seems to
> interpret the elf (Linux can run different kinds of executables,
> remember). And in the process something gets messed up.
> So I am back to trying to figure out what is going wrong with loading
> init and I am suspicious that do_mmap_pgoff() calls are not
> all happening right and will be comparing them with what mappings.
> But I wish I knew more about what does...

If you compiled it static (e.g. pass -static to gcc), then the
dynamic-linker shouldn't be referenced in the executable. The kernel
doesn't assume that elf requires, that's something that is
placed into the executable itself as the INTERP. If you have an INTERP
section in your test executable, you didn't link it properly. There
should be no references to NEEDED and INTERP when you do:

# coldfirev4e-elf-objdump -x hello | less

Debian     -
Linux 1394 -
Subversion -
Deqo       -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:31 EST