From: Chris E. <cem...@ch...> - 2000-05-02 23:38:36
|
On Mon, 1 May 2000, Jeff Dike wrote: [snip] > > There's one reference to EDX in finish_exec() - what's that one > > for? > > You need to worry about this one. Elf binaries take a value in EDI > (on i386) which is an address of an initialization procedure or > something. Linux doesn't use it, so it goes in as zero. Look > through asm-ppc/*elf*.h for something similar. There doesn't seem to be anything similar. There's a comment somewhere saying that i386 takes a pointer to a function to call on exit in EDX, and not mentioning other architectures. Do you know of a good online reference for Elf things like this? > > I've deleted a large chunk of arch/um/kernel/syscall_kern.c for > > system calls which don't seem to exist on PPC. > > This sucks. Indeed. I now have an #ifdef. I think it'd be useful to define a symbol like __UM_$(SUBARCH)__ or something similar for this sort of thing. At least some of the syscalls there will be i386 only, rather than just non-ppc (vm86 springs to mind). > > +#define UM_SP_OFFSET UESP > > +#define UM_IP_OFFSET EIP > > These are wrong, and I bet the ppc equivalents you've got are wrong, > too. Yes, you're absolutely right... brain failure on my part. > I would prefer that you have your Makefile make links to arch/ppc > files that you're just going to steal whole. That keeps the patch > size down, and gives this kernel the benefit of whatever changes are > made in those files in the future. I've done that for bitops.c. The assembler functions are trickier, as they seem to need quite a bit of the environment from arch/ppc. I'll look into it. Chris -- Chris Emerson, obsessed Cambridge juggler E-mail: cem...@ch... Web page: http://www.chiark.greenend.org.uk/~cemerson/ |