From: Jeff D. <jd...@ka...> - 2000-05-03 17:01:54
|
> Ok. It's possible that that sequence of ptrace calls may need to be > separated out, since the PPC stuff may need to set several more > registers than i386. I think I mentioned in one of my various pieces of mail that I'm going to change it to UM_EXEC_INIT(pid) (I just made up the name right now though...). That gives i386 the info it needs. If ppc needs to zero out a bunch of registers, you can define it as ({ ptrace(PTRACE_POKEUSER, pid, reg1, 0); ptrace(PTRACE_POKEUSER, pid, reg2, 0); ... 0; }) > I don't know how much of that is handled by the exec code outside of > arch/um, and how much is actually supposed to be done by your code. Any low-level stuff like setting up registers is done in the arch layer. The address space and everything else is set up by the upper layers. > Incidentally, it looks like the current system I have is falling over > inside padzero() from the elf loading stuff. I suppose that means the > bss hasn't been mapped properly. That's supposed to get a segfault. The fault handler is supposed to map in the page properly. When you exec, there are going to be three segfaults before the process actually gets going - the stack, padzero filling out bss, and the entry point. So the segfault handler is going to map those three pages in before anything else happens. Jeff |