> From: Richard B. Johnson [mailto:email@example.com]
> Some functions like mmap() take 6 parameters!
> Does anybody know how these parameters get passed?
> I have an "ultra-light" 'C' runtime library I have
> been working on and, so-far, I've got everything up
> to mmap() (in syscall.h) (89 functions) working.
> I thought, maybe ebp was being used, but it doesn't
> seem to be the case.
I use %ebp, it seemed to work last time I played with it:
int st_mmap (void *addr, size_t len, int protection, int flags, int fd,
asm volatile (
"pushl %%ebp \n"
"movl %6, %%ebp \n"
"movl %7, %%eax \n"
"int $0x80 \n"
"popl %%ebp \n"
: "=a" (result)
: "b" (addr), "c" (len), "d" (protection),
"S" (flags), "D" (fd), "m" ((offset >> PAGE_SHIFT)),
I thing I got it from an straight disassemble dump of glibc's
Iñaky Pérez-González -- Not speaking for Intel -- all opinions are my own
(and my fault)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Wed Apr 23 2003 - 22:00:20 EST