When investigating your example: without knowing to much of how HelenOS
works, but I would think your hello example not even gets executed at
all, or am I wrong?

Yes, you are completely right. I can confirm it in the current checkout of the base-spartan branch (7a40f3a7c7aad9a1b7ee6eb2c56e84a7cc39227e) with the two test binaries ("while" and "hello"): The first binary fails to load and the kernel reports

init[0]: Init binary load failed (error -11)

The second binary also fails to load, but this is silently ignored. If the last binary fails to load, it is considered a RAM disk with the initial root file system (the kernel does not touch the RAM disk, it only passes it to the user space) and nothing is reported. I know, this is not very user-friendly for debugging, but it is simply the way it is supposed to work.

Error code -11 is ENOTSUP (returned from program_create_from_image()) which means that the elf_load() failed. I have committed a small changeset to our mainline branch which shows the return value of elf_load() if the kernel is compiled with the CONFIG_LOG (Detailed kernel logging) option.

Thus the obvious thing to do now is to look at elf_load() and analyse what it dislikes about your binaries.


M.D.

_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel

Reply via email to